I am having a problem processing XML reply string from a web services query
<?xml version="1.0" encoding="UTF-8"?>
<UDSObjectList>
<UDSObject>
<Handle>cnt:CCA48</Handle>
<Attributes>
<Attribute DataType="2009">
<AttrName>id</AttrName>
<AttrValue>CCA48E467FCD5946B3F944778F885C28</AttrValue>
</Attribute>
<Attribute DataType="2002">
<AttrName>combo_name</AttrName>
<AttrValue>DT-NL-Velsen</AttrValue>
</Attribute>
</Attributes>
</UDSObject>
</UDSObjectList>
above is the result of a query that only returned one result(this data is in the Variable XMLString below)
below is the script :
Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
XMLString= USDWebService.doSelect(iSID, sObjectType, "last_name LIKE '%dt_nl_vels%'", 10, arrChangeRequestAttr)
objXMLDoc.async = False
objXMLDoc.load(XMLString)
what I want to do is select the 1st USDobject (in case my query retrieved more than one object) and return the handle value. below is how I tried to do it....
Set NodeList = objXMLDoc.GetElementsByTagName("Handle").Item(0).InnerText
nodelist should contain :
cnt:CCA48
the error I get is Object required : 'objXMLDoc.GetElementsByTagName(...).Item(....)'
<?xml version="1.0" encoding="UTF-8"?>
<UDSObjectList>
<UDSObject>
<Handle>cnt:CCA48</Handle>
<Attributes>
<Attribute DataType="2009">
<AttrName>id</AttrName>
<AttrValue>CCA48E467FCD5946B3F944778F885C28</AttrValue>
</Attribute>
<Attribute DataType="2002">
<AttrName>combo_name</AttrName>
<AttrValue>DT-NL-Velsen</AttrValue>
</Attribute>
</Attributes>
</UDSObject>
</UDSObjectList>
above is the result of a query that only returned one result(this data is in the Variable XMLString below)
below is the script :
Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
XMLString= USDWebService.doSelect(iSID, sObjectType, "last_name LIKE '%dt_nl_vels%'", 10, arrChangeRequestAttr)
objXMLDoc.async = False
objXMLDoc.load(XMLString)
what I want to do is select the 1st USDobject (in case my query retrieved more than one object) and return the handle value. below is how I tried to do it....
Set NodeList = objXMLDoc.GetElementsByTagName("Handle").Item(0).InnerText
nodelist should contain :
cnt:CCA48
the error I get is Object required : 'objXMLDoc.GetElementsByTagName(...).Item(....)'