Here's one way:
Public Function GetNodes(ByVal xpathExpression As String) As String()
Dim node As XmlNode = m_root.SelectSingleNode(xpathExpression)
If node Is Nothing Then Return Nothing
Dim nodelist As XmlNodeList = node.ChildNodes
Dim s(nodelist.Count - 1) As String
Dim i As Integer = 0
For Each xnode As XmlNode In nodelist
s(i) = xnode.Name
i += 1
Next
Return s
End Function
HTH
Steve
"vbmark" <no@email.com> wrote in message
news:Xn************************@199.45.49.11...
I have the follwing XML string:
<RecordSet>
<Row RowNumber="1">
<UserID>111</UserID>
<Phone>1234567890</Phone>
</Row>
<Row RowNumber="2">
<UserID>747</UserID>
<Phone>9876543210</Phone>
</Row>
</RecordSet>
A <Row> can have a variable number of elements in it.
How do I get a list of the elements? Such as in the
above case would be UserID and Phone?
My goal is to convert the XML into a Dataset.
Thanks!