vb.net VS 2012
<?xml version="1.0" encoding="UTF-8"?>
-<XMLRateQuote xmlns=" xmlns:xsi=" xmlns:xsd="//list is shortened for your viewing pleasure
-<ExtraServiceBreakdown>-
<XMLAccessorial>
<Id>ISP</Id>
<Description>Inside Pickup Fee</Description>
<Cost>124.45</Cost>
</XMLAccessorial>
-<XMLAccessorial>
<Id>HTA</Id>
<Description>Heavy Traffic Congestion Fee-Destination</Description>
<Cost>35.00</Cost>
</XMLAccessorial>
</ExtraServiceBreakdown>
</XMLRateQuote>
I'm looping through the <XMLAccessorial> node. [Dim access As XmlElement = DirectCast(xmldoc.SelectSingleNode("/df:XMLRateQuote/df:ExtraServiceBreakdown/df:XMLAccessorial", mgr), XmlElement)] When I fire off the access.nextsibling all I get is the same ID, Description, and cost. (ISP,Inside Pickup,124.45) . Next sibling would be (HTA, Heavy Traffic COnjestion Fee destination, 35.00)
Dim access As XmlElement = DirectCast(xmldoc.SelectSingleNode("/df:XMLRateQuote/df:ExtraServiceBreakdown/df:XMLAccessorial", mgr), XmlElement)
Dim AccessorialID As XmlElement
Dim AccessorialDescription As XmlElement
Dim AccessorialCost As XmlElement
Dim strAccessorialID As String
Dim strAccessorialCost As String
Dim strAccessorialDescription As String
Do While (access IsNot Nothing)
If access.LocalName = "XMLAccessorial" Then
AccessorialID = DirectCast(xmldoc.SelectSingleNode("/df:XMLRateQuote/df:ExtraServiceBreakdown/df:XMLAccessorial/df:Id", mgr), XmlElement)
strAccessorialID = AccessorialID.InnerText.ToString
AccessorialDescription = DirectCast(xmldoc.SelectSingleNode("/df:XMLRateQuote/df:ExtraServiceBreakdown/df:XMLAccessorial/dfescription", mgr), XmlElement)
strAccessorialDescription = AccessorialDescription.InnerText.ToString
AccessorialCost = DirectCast(xmldoc.SelectSingleNode("/df:XMLRateQuote/df:ExtraServiceBreakdown/df:XMLAccessorial/df:Cost", mgr), XmlElement)
strAccessorialCost = AccessorialCost.InnerText.ToString
End If
access = access.NextSibling
Loop
<?xml version="1.0" encoding="UTF-8"?>
-<XMLRateQuote xmlns=" xmlns:xsi=" xmlns:xsd="//list is shortened for your viewing pleasure
-<ExtraServiceBreakdown>-
<XMLAccessorial>
<Id>ISP</Id>
<Description>Inside Pickup Fee</Description>
<Cost>124.45</Cost>
</XMLAccessorial>
-<XMLAccessorial>
<Id>HTA</Id>
<Description>Heavy Traffic Congestion Fee-Destination</Description>
<Cost>35.00</Cost>
</XMLAccessorial>
</ExtraServiceBreakdown>
</XMLRateQuote>
I'm looping through the <XMLAccessorial> node. [Dim access As XmlElement = DirectCast(xmldoc.SelectSingleNode("/df:XMLRateQuote/df:ExtraServiceBreakdown/df:XMLAccessorial", mgr), XmlElement)] When I fire off the access.nextsibling all I get is the same ID, Description, and cost. (ISP,Inside Pickup,124.45) . Next sibling would be (HTA, Heavy Traffic COnjestion Fee destination, 35.00)
Dim access As XmlElement = DirectCast(xmldoc.SelectSingleNode("/df:XMLRateQuote/df:ExtraServiceBreakdown/df:XMLAccessorial", mgr), XmlElement)
Dim AccessorialID As XmlElement
Dim AccessorialDescription As XmlElement
Dim AccessorialCost As XmlElement
Dim strAccessorialID As String
Dim strAccessorialCost As String
Dim strAccessorialDescription As String
Do While (access IsNot Nothing)
If access.LocalName = "XMLAccessorial" Then
AccessorialID = DirectCast(xmldoc.SelectSingleNode("/df:XMLRateQuote/df:ExtraServiceBreakdown/df:XMLAccessorial/df:Id", mgr), XmlElement)
strAccessorialID = AccessorialID.InnerText.ToString
AccessorialDescription = DirectCast(xmldoc.SelectSingleNode("/df:XMLRateQuote/df:ExtraServiceBreakdown/df:XMLAccessorial/dfescription", mgr), XmlElement)
strAccessorialDescription = AccessorialDescription.InnerText.ToString
AccessorialCost = DirectCast(xmldoc.SelectSingleNode("/df:XMLRateQuote/df:ExtraServiceBreakdown/df:XMLAccessorial/df:Cost", mgr), XmlElement)
strAccessorialCost = AccessorialCost.InnerText.ToString
End If
access = access.NextSibling
Loop