Doing a VBScript that should parse XML and get some info, here's an example of XML:
<?xml version="1.0" encoding="windows-1251"?>
<Performance>
<Group>EX-007
<Student>
<Name>testname</Name><ID>12345</ID>
<Subject>Informatics
<Semester>1<Mark>
<Exam>5</Exam>
</Mark></Semester></Subject>
<Subject>Phys
<Semester>2<Mark>
<PersonalTask>4</PersonalTask>
<Exam>3</Exam>
</Mark></Semester></Subject>
</Student>
</Group>
</Performance>
This is the VBScript code:
Set xml = CreateObject("Msxml.DOMDocument")
success = xml.Load("data1.xml")
Set root = xml.DocumentElement
Set nodes = root.SelectNodes("Group")
WScript.Echo(nodes(0).text)
I would like to get an "EX-007" output in console, but instead it outputs the whole tree under the group tag. What's wrong here?