David Smith

David Smith

  • NA
  • 2k
  • 0

XML Parse: DocumentElement

Aug 6 2016 3:14 AM

Here is my xml, I am having trouble pulling the values out of coordinate values. I see the coordinate values in the inner xml itellisense. How do get to the level of this element below

<type>Polygon</type>
<coordinates>-10</coordinates>
<coordinates>10</coordinates>
<coordinates>9</coordinates>

<coordinates>3</coordinates>
</coordinates></coordinates>

For Each childNode As XmlNode In xd.DocumentElement.ChildNodes
For Each node As XmlNode In childNode
If node.Name = "Points" Then
point(index).X= Convert.ToDouble(node.Attributes("coordinates").Value) // Error
point(index).Y= Convert.ToDouble(node.Attributes("coordinates").Value) //Error
index = index + 1
'Next
End If
Next
Next

Answers (5)