Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: No bonus points for you :-)

by ikegami (Pope)
on Mar 24, 2013 at 07:12 UTC ( #1025119=note: print w/replies, xml ) Need Help??


in reply to No bonus points for you :-)
in thread LibXML, XPath and Namespaces

That wouldn't be a valid XPath. XPath "foo" matches child elements named "foo" in the null namespace. There's no way to specify a default namespace for nodetests in an XPath.

Furthermore, gt is a prefix, not a namespace. http://www.govtalk.gov.uk/CM/envelope is the namespace in this case. gt is completely arbitrary, meaningless.

Replies are listed 'Best First'.
Re^2: No bonus points for you :-)
by space_monk (Chaplain) on Mar 25, 2013 at 10:02 UTC

    Yes, I'm aware the prefix is meaningless. Word it how you like, I wanted some way of making a null/default prefix map to my namespace. I know that XML has its flaws and this seems to be one of them.

    A Monk aims to give answers to those who have none, and to learn from those who know more.
      It's a limitation of XPaths, not XML. It's entirely possible to define the default namespace in XML.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1025119]
help
Chatterbox?
[LanX]: Copts
[erix]: sorry - just pulling your leg
[robby_dobby]: erix: It's a little late for that :-)
[robby_dobby]: I was falling asleep at my chair and threw out that one bit about participating in a YAPC. Things went from there :-)
[erix]: never too late to pull legs
[LanX]: Official YAPC Africa 2013 Announcement
erix always game to pull legs from sleeping cells
[erix]: hm nice might do a spot of diving - Red Sea is said to be beautiful
[LanX]: well too many terrorist tourists
[erix]: I guess I can pass for a native

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (13)
As of 2017-04-24 16:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (442 votes). Check out past polls.