I have a sample file source.xml:
and batch file test.btm.
As expected, the script returns
from TCC 26.02.43 x64 on Windows 10. However, the script fails with the following error when run from TTC 27.01.24 x64 or TCC 28.01.14 x64.
Am I doing something wrong?
XML:
<?xml version="1.0" encoding="UTF-8"?>
<Instructors>
<Instructor Dept_ID="123">
<Name First="John" Last="Doe">Doe, John</Name>
</Instructor>
<Instructor Dept_ID="456">
<Name First="Jane" Last="Doe">Doe, Jane</Name>
</Instructor>
</Instructors>
and batch file test.btm.
Code:
@echo off
SET a=%@XMLOPEN[source.xml]
SET b=%@XMLNODES[/Instructors]
DO i = 1 to %b
SET id=%@XMLXPATH[/Instructors/Instructor[%i]/@Dept_ID]
echo %id
ENDDO
SET c=%@XMLCLOSE[]
As expected, the script returns
Code:
123
456
from TCC 26.02.43 x64 on Windows 10. However, the script fails with the following error when run from TTC 27.01.24 x64 or TCC 28.01.14 x64.
Code:
TCC: C:\Users\rhens\OneDrive - Michigan State University\Department Queries\MailMerge\scratch\test.btm [9] Invalid XPath. "/Instructors/Instructor[1]/@Dept_
ID"
ECHO is OFF
TCC: C:\Users\rhens\OneDrive - Michigan State University\Department Queries\MailMerge\scratch\test.btm [9] Invalid XPath. "/Instructors/Instructor[2]/@Dept_
ID"
ECHO is OFF
Am I doing something wrong?