Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: how to get XML::LibXML perfect xpath query ?

by ikegami (Patriarch)
on Jun 12, 2010 at 23:30 UTC ( [id://844378]=note: print w/replies, xml ) Need Help??


in reply to how to get XML::LibXML perfect xpath query ?

But every time we can't get same namespace

It doesn't make sense for the namespace to change. The prefix can change, but it doesn't matter what prefix the XML uses. The one you use doesn't have to be the same. Just the namespace has to be the same.

But let's say that's what you have. If you need to match nodes by name no matter which namespace the element belongs to, you can use

.../name()="name"/...

instead of

.../ns:name/...

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://844378]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-25 17:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found