Hi All,
Hope your weekend is good.
Here is some XML:
Here is part of my code that is trying to reach elements within the header node:
The code does not error but fails to bring any values for loginGUID and API_Version .
Any ideas?
Cheers, Dave.
Hope your weekend is good.
Here is some XML:
Code:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<placeOrder xmlns="http://tempuri.org/">
<dbsAPIRequest>
<Header>
<loginGUID>026b518c-6916-434a-85ba-88fedce62fac</loginGUID>
<API_Version>1</API_Version>
</Header>
</dbsAPIRequest>
</placeOrder>
</soap:Body>
</soap:Envelope>
Code:
Dim HeaderXMLNodelst As XmlNodeList = orders.SelectNodes("//Envelope/Body/placeOrder/dabsAPIRequest/Header")
For Each HeaderXMLItem As XmlNode In HeaderXMLNodelst
loginGUID = HeaderXMLItem.SelectSingleNode("CompanyGUID").InnerXml
API_Version = Convert.ToInt32(HeaderXMLItem.SelectSingleNode("API_Version").InnerXml)
Next
The code does not error but fails to bring any values for loginGUID and API_Version .
Any ideas?
Cheers, Dave.