Question:
I've been pulling my hair out trying to figure out how to parse the XML code below in VB6. I need to be able to reference the content by it's tag name. For example I need to be able to pluck the content by it's element name e.g. "Album" and have it return the content "Face Up in the Rain." Preferably without having to do any iteration. Example strAlbum = XML.someMethodByTagName("Album") I've been able to reference and obtain the content by using an index i.e. strAlbum = XML.GetChildContentByIndex(n), but I need to be able to use the tag name because the order and number of the elements might change. Also, please note there are two references to "Status" and one element named "Name."
<Response Status="OK">
<Item Name="ZoneID">0</Item>
<Item Name="State">2</Item>
<Item Name="FileKey">305718</Item>
<Item Name="Artist">Michael Tomlinson</Item>
<Item Name="Album">Face Up in the Rain</Item>
<Item Name="Name">The Way We're Going</Item>
<Item Name="Status">Playing</Item>
</response>
Any insight/help would be greatly appreciated.
p.s. I'm woking in VB6, not C.
Here's an example:
C# WinRT: XML GetChildWithAttr
Classic ASP: XML GetChildWithAttr
DataFlex: XML GetChildWithAttr
Delphi ActiveX: XML GetChildWithAttr
Delphi DLL: XML GetChildWithAttr
Objective-C: XML GetChildWithAttr
PHP ActiveX: XML GetChildWithAttr
PHP Extension: XML GetChildWithAttr
PowerBuilder: XML GetChildWithAttr
PowerShell: XML GetChildWithAttr
PureBasic: XML GetChildWithAttr
SQL Server: XML GetChildWithAttr
Unicode C: XML GetChildWithAttr
Unicode C++: XML GetChildWithAttr
VB.NET WinRT: XML GetChildWithAttr
VBScript: XML GetChildWithAttr