[Home] [By Thread] [By Date] [Recent Entries]



Dare Obasanjo wrote:

> One of our devs just made me question all that's right in the world with
> the question below. Given the following XML
>
> <pre>
>   <b>bold</b>
>   <i>italic</i>
> </pre>
>
> what is the result of the following XPath expression
> "count(/pre/child::node())" ?
>
> Is the answer 2 or 5?

Five.

"count(/pre/child::*)" yields the more intuitively correct result.


--Joe English

  jenglish@f...


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member