-
-
I'm serious, and I probably shouldn't have used the word 'challenge'... it is more about coming up with a simple yet elegant parsing solution. So, starting from the standpoint that a SOAP query using SoapClient30 returns an XML nodelist Object (and using the WeatherService wdsl as our basis)....
assume you wrote something like
[vba]
t=" "
strXml = ''
For Each oNode In oNodeList
strXml = strXml & oNode.NodeName & vbcrlf
If oNode.HasChildnodes
For j=0 To oNode.Childnodes.Length -1
oNode1 = oNode.Childnodes(j)
strXml = strXml & t & oNode1.NodeName & vbcrlf
If oNode1.HasChildnodes
For k=0 To oNode1.Childnodes.Length -1
oNode2 = oNode1.Childnodes(k)
strXml = strXml & t & t & oNode2.NodeName & vbcrlf
Next
Endif
Next
Endif
Next
[/vba]
You could expose strXml as [see attached image]. Therefore, parsing the childnode.text values would be easy, but in a general sense, is there a way to pre-determine the level of childnodes? Would xPath be a better route to follow? I would not so much be interested in parsing the results into Excel, but into a Recordset.
Anyone is welcome to jump in. This is not a boring exercise.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules