Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Evaluate xpath sum() function with msxml

From: "Dimitre Novatchev" <dnovatchev@-----.--->
To: 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.
>>
>>
>
> 




transparent
Print
Mail
Digg
delicious
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