Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Help trying to Parse XML file >Thread Next - Re: Help trying to Parse XML file Re: Help trying to Parse XML fileTo: NULL Date: 3/2/2006 4:51:00 PM
>
> I'm new to XML, and honestly after reading thru the MS docs I'm still
> confused on how to do this. I'm using VBScript and here is a snip of
> what I'm trying to do, can you point me in the direction that I have
> gone wrong?
>
> SNIPPIT
> Dim Node
> Set XMLDoc = CreateObject("msxml.domDocument")
> XMLDoc.async = "False"
> XMLDoc.Load (LogLocation & Log(j))
> For Each Node in XMLDoc
> If Node.NodeType = "NODE_TEXT" Then
> 'Plan to have other code in
> here
> Line = Node.parentNode.nodename & "|" & Node.NodeValue
> End If
> Next
>
If all your looking for is a set of keywords then
sText = XMLDoc.Text
will get you all the text not in any markup.
To get text of all the attributes in the XML:-
For Each Node in XMLDoc.selectNodes("//@*")
sOtherText = Node.nodeName & " | " & Node.Text
Next
Does that help?
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
