simon wrote:
Hello,

I have a question, if it is possible to remove namespace definition
attribute inside LibXML::XML::Node object.

Have this object (class LibXML::XML::Node):

<div xmlns:mob="http://www.volantis.com/xmlns/mobilizer";
class="navigation" id="_6" mob:name="Menu"
mob:menustyle="menu_unfolded" propagation="true"
mob:numericshortcuts="false" style="STATIC">
  <a href="/about">Stronka testowa</a>
</div>

There is the same namespace definition inside the root node:

<html xmlns:mob="http://www.volantis.com/xmlns/mobilizer";
xmlns:urid="http://www.volantis.com>
[....]
</html>

Do I have any access to xmlns attriibute (in div node)?
I tried:
node["mob"] or node["xmlns:mob"] and both return nil

Yes, this part of libxml is confusing and needs to be refactored.  Anwyay:

node.namespace_node  -> the node's namespace

node.namespace or node.ns -> a list of all current namespaces for the node

node.ns_def -> A list of namespaces defined on the element

Charlie

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to