Anonymous committed af92f49

Updated the Namespace docs with attribute compatibility methods

Comments (0)

Files changed (1)


 The namespace node API is not part of any current DOM API, and so it is quite
 minimal. It should be noted that namespace nodes are <b>not</b> a sub
-class of XML::LibXML::Node.
+class of XML::LibXML::Node, however Namespace nodes act a lot like
+attribute nodes, and similarly named methods will return what you would
+expect if you treated the namespace node as an attribute.
 <method name="getName" synopsis="print $ns->getName()">
   Returns "xmlns:prefix", where prefix is the prefix for this namespace.
   Returns the prefix bound to this namespace declaration.
+<method name="getLocalName" synopsis="$localname = $ns->getLocalName()">
+  Alias for prefix()
 <method name="getData" synopsis="print $ns->getData()">
   Returns the URI of the namespace.
   Alias for getData()
+<method name="getNamespaceURI" 
+    synopsis="$known_uri = $ns->getNamespaceURI()">
+  Returns the string ""
+<method name="getPrefix"
+    synopsis="$known_prefix = $ns->getPredix()">
+  Returns the string "xmlns"