I have a sample file source.xml:
and batch file test.btm.
Read more
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