Re: [xml] XPath and indentation

Leonardo Giordani wrote:

> and running the following query "//person[name=John]" all is working right.
> If I try to parse the following XML doc
> ...
> <person>
>   <name>
>     John
>   </name>
> <person>
> ...
> the query gives no results: in particular the xmlPathNodeSetIsEmpty() function
> called on the results of the xmlPathEvalExpression() gives 0 as result.

indeed, the content of 'name' is not 'John' but something like '\nJohn \n'.
Whitespace matters !


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]