Quantcast
Channel: Take Command / TCC
Viewing all articles
Browse latest Browse all 1680

@XMLXPATH not working in v28

$
0
0
I have a sample file source.xml:

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...

Read more

Viewing all articles
Browse latest Browse all 1680

Trending Articles