Blowfelt82
asked on
VBScript Query XML at multiple levels.
I have XML in the following format...
This XML is loaded into an object named OSystem. I query this as follows...
This returns the Windows type element, I need a way to get all type elements at both the machine and machine/external level. So all 3 basically...
Preferably if this can be done in one statement, but if two are needed and then the sets could be joined than this could be an option?
<xml>
<machine id="512">
<type name="Windows" />
<external>
<type name="Linux" />
<type name="Apple" />
</external>
</machine>
</xml>
This XML is loaded into an object named OSystem. I query this as follows...
Set Nodes = OSystem.SelectNodes("/machine[@id='512']/")
Set Items = Nodes.getElementsByTagName ("type")
This returns the Windows type element, I need a way to get all type elements at both the machine and machine/external level. So all 3 basically...
Preferably if this can be done in one statement, but if two are needed and then the sets could be joined than this could be an option?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.