No such thing as a small change | |
PerlMonks |
Re^4: copyCurrentNode in XML::LibXML::Reader will add xmlns attribute ( setNamespaceDeclURI )by choroba (Cardinal) |
on Sep 20, 2017 at 11:45 UTC ( [id://1199726]=note: print w/replies, xml ) | Need Help?? |
I don't get it. I experimented with $node->setNamespace(undef, undef, 1) which seems to be the simplest namespace handling fucntion, but I couldn't get it work. XML::LibXML defines setNamespace in the following way:
where _setNamespace comes from its XS component, the important part (I guess) is the following:
setNamespace returns 1, so I guess it goes the "else if" branch, but the namespace isn't removed from the node. xmlSetNs comes from libxml2 and is defined as (debugging ifdefs removed)
Anyone can explain why the namespace isn't changed?
In Section
Seekers of Perl Wisdom
|
|