Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: XML namespaces

by Corion (Patriarch)
on Jul 24, 2018 at 16:22 UTC ( [id://1219178]=note: print w/replies, xml ) Need Help??


in reply to XML namespaces

You don't tell us what error message you get or how you used ->registerNs to register your namespace.

I've used XML::LibXML with namespaces and ->findnodes and I'm fairly certain that they work. Maybe the problem is your XPath expression - doc is different from foo:doc, if foo is the namespace urn:foo:names:tc:doc:document:1.2 where the doc element lives in. Maybe changing your XPath query to the following will make things work if you specify the namespaces for each node not in th edefault namespace:

/foo:doc/body/node

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 22:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found