Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - How do I run an XPath expression in ASP >Thread Next - Re: How do I run an XPath expression in ASP Re: How do I run an XPath expression in ASPTo: NULL Date: 9/3/2005 11:31:00 AM shripaldalal wrote: > Can someone tell me how can I run an XPath calculation expression in > classic ASP. I know we cannot use selectnodes or selectsinglenode > methods. Why not? Dim XmlDocument, Loaded Set XmlDocument = Server.CreateObject("Msxml2.DOMDocument.3.0") xmlDocument.async = False Loaded = xmlDocument.load Server.MapPath("example.xml") If Loaded Then ' use XPath here xmlDocument.setProperty "SelectionLanguage", "XPath" xmlDocument.selectNodes ... > How can I run the XPath expression like > selectsinglenode(//invoice/products/row/qty * > //invoice/products/row/rate) and get it to return a number instead of a > single node or nodes ? Oh, I see, so your problem is not to use selectNodes or selectSingleNode in general with classic ASP but to find a way to return a number value. One way to solve that is to create an XSLT stylesheet on the fly inserting the intended XPath expression and extract the result from running the transformation. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
