![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Evaluate xpath sum() function with msxml [Thread Next] Re: Evaluate xpath sum() function with msxmlTo: NULL Date: 3/4/2005 6:56:00 AM Something I wrote in 2000. It is a quite popular XPath learning tool. Read more here: http://topxml.com/xpathvisualizer/ A version for Mozilla/Firefox is also available. Cheers, Dimitre Novatchev "Xerox" <anon@a...> wrote in message news:ui25Z48HFHA.2456@T...... > Dimitre, what is the "XPath Visualizer"? > > "Dimitre Novatchev" <dnovatchev@y...> wrote in message > news:38mhv9F5poue1U1@i...... >> >> "Xerox" <anon@a...> wrote in message >> news:uykVfSxHFHA.2648@T...... >> > Can I not execute the xpath without a stylesheet? >> > >> > I want something like this: totalPrice = XMLDocument.Evaluate >> > ("sum(//item/@price)") >> > >> No, there's no method to evaluate an XPath expression that evaluates to a >> scalar (something that is not a node-set). >> >> Using the transformNode() method is what is used inside the XPath > Visualizer >> to obtain the result of evaluating any such XPath expression. It first >> catches the failure of selectNodes(), then it analyses the error message > to >> determine that this is not another type of error, then finally, if the > error >> message is for trying to evaluate an XPath expression returning a scalar, > it >> invokes transformNode() with a dynamically modified (to have the > particular >> XPath expression as the value of an "select" attribute) generic >> stylesheet >> that produces the result of evaluating the XPath expression. >> >> >> Cheers, >> Dimitre Novatchev. >> >> > > | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
