Need help on how to get values in an XML file. My XML would
something like the one I attached. Depending on the input
status attribute (success or fail), I would need to retrieve
the UnallocatedQuantity value. I was able to go as far as
checking the attribute value, but couldn't quite figure out
how to get the value for the quantity. The code I tried
just keeps on returning the 1st one it found. Please help.
xmldom.ConnectToNewObject("Microsoft.XMLDOM")
//Load XML File
xmldom.LoadXml(s_inline)
xml_node_list = xmldom.SelectNodes("//Input")
li_length = integer(xml_node_list.length) - 1
FOR i = 0 to li_length
xml_node = xml_node_list.item(i)
ls_attribute =xml_node.getAttribute("status")
IF TRIM(lower(ls_attribute)) = "success" THEN
//GET UNALLOCATEDQUANTITY
xml_doc =
xml_node.SelectSingleNode("//UnallocatedQuantity")
s_text = xml_doc.NodeTypedValue
ELSE
//Set Quantity to 0
END IF
NEXT