hi gurus
New to xml so go easy on me. I know that for some of you this is no problem.
I have an xml file:
<root>
<social>xxx-xx-xxxx</social>
<color>black and white</color>
<name>
<first> john</first>
<Last> smith</Last>
</name>
</root>
I need to read the xml file and browse through all the nodes so I can get values on specific rules
Need your help thanks
so far I have the following:
hoW do I browse through the child to get values.Code:Dim nodelist As MSXML.IXMLDOMNodeList Dim rootele As MSXML.IXMLDOMElement Dim xNode As MSXML.IXMLDOMNode Set xDoc = New MSXML.DOMDocument If xDoc.Load("C:\SHC_2005_07_28_16_10_59_165_SINGLE.xml") Then MsgBox "loaded" Set rootele = xDoc.documentElement Set nodelist = rootele.childNodes For Each xNode In nodelist 'do something next xNode end if
the code above gives me the childs of the root (social,color,name) but it does not bring up the child of name (first,last)
Thanks again in advance




Reply With Quote