Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Parsing XML using MSXML3 [Thread Next] Re: Parsing XML using MSXML3To: 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/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
