Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Parsing XML using MSXML3

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 9/1/2005 2:25:00 PM

Kota wrote:


> using this string I want to parse required node using MSXML3
> 
> How we can parse required node instead of looping all the nodes.
> 
> currently I am doing
>  Set xmlDoc = New MSXML2.DOMDocument30
>     xmlDoc.loadXML strXML
> Set objNodelist = xmlDoc.getElementsByTagName("DialogTable")
> 
> getting all the nodes and looping. this may efect performance.

MSMXL 3 supports XPath so you need to set
   xmlDoc.setProperty "SelectionLanguage", "XPath"
after the loadXML call, then you can use the methods xmlDoc.selectNodes 
and xmlDoc.selectSingleNode to find nodes using XPath expressions.
XPath docs are here:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/6da1b6e3-256e-4919-8848-53b425f72ed1.asp>

A short XPath tutorial is here:
<http://www.w3schools.com/xpath/default.asp>

If you need help formulating an XPath expression then show a short but 
relevant snippet of the XML.

-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent