Matching nodes using rexml

Hello,

Question about XPath queries in rexml.

I have…


test

I want to get the child node with the test text.

Doing this always returns nil and I get runtime errors…
XPath.match(doc.root, ‘child[text()=“test”]’)

How do I get only the child nodes with “test” as the node text using XPath
or any other method of rexml?

Thanks,
Andrew

“Andrew” nospam123@anon.com wrote in message news:wEMma.727576$Yo4.66288081@news1.calgary.shaw.ca

Question about XPath queries in rexml.

Doing this always returns nil and I get runtime errors…
XPath.match(doc.root, ‘child[text()=“test”]’)

That’s a bug. I’ve taken a look at it, and I suspect that what you’ve
found is part of a larger problem in the XPath evaluator. I’ll fix
it, but it may take a couple of days, as the solution may not be
simple.

···

SER Deutsch|Esperanto|Francaise|Linux|Java|Ruby|Aikido|Dirigibles

http://www.germane-software.com/~ser jabber.com:ser ICQ:83578737

GPG: http://www.germane-software.com/~ser/Security/ser_public.gpg

ser@germane-software.com (Sean Russell) wrote in message news:83173408.0304150830.146678c@posting.google.com

“Andrew” nospam123@anon.com wrote in message news:wEMma.727576$Yo4.66288081@news1.calgary.shaw.ca

Question about XPath queries in rexml.

That’s a bug. I’ve taken a look at it, and I suspect that what you’ve
found is part of a larger problem in the XPath evaluator. I’ll fix
it, but it may take a couple of days, as the solution may not be
simple.

It turned out the solution wasn’t that complex. I’ll be posting
2.[45].8 with this, and some other bug fixes, within a couple of days.

— SER

Thanks for the feedback and the quick fix.

Andrew

“Sean Russell” ser@germane-software.com wrote in message
news:83173408.0304160741.169e6957@posting.google.com

ser@germane-software.com (Sean Russell) wrote in message
news:83173408.0304150830.146678c@posting.google.com

“Andrew” nospam123@anon.com wrote in message
news:wEMma.727576$Yo4.66288081@news1.calgary.shaw.ca

···

Question about XPath queries in rexml.

That’s a bug. I’ve taken a look at it, and I suspect that what you’ve
found is part of a larger problem in the XPath evaluator. I’ll fix
it, but it may take a couple of days, as the solution may not be
simple.

It turned out the solution wasn’t that complex. I’ll be posting
2.[45].8 with this, and some other bug fixes, within a couple of days.

— SER