possible bug in xmerl_xpath
David Cabrero Souto
cabrero@REDACTED
Fri Nov 19 12:43:14 CET 2004
Hi everybody.
I came acrross this:
Xpath expression that select nodes of type text() don't work, ie.
"contexto/text()", "child::text()", "descendant::text()", ...
In function xmerl_xpath:node_test/3 where it says:
node_test(({node_type, NT}, #xmlNode{node = N}, _Context) ->
case {NT, N} of
{text, {_Data}} ->
true;
...
it should (I think) say:
node_test({node_type, NT}, #xmlNode{node = N}, _Context) ->
case {NT, N} of
{text, #xmlText{}} ->
true;
...
That little patch fixed the problem for me.
Regards.
David
-----
More information about the erlang-questions
mailing list