Commits

ma...@9ae0c189-cd1f-4510-a509-f4891f5cf20d  committed af92f49

Updated the Namespace docs with attribute compatibility methods

  • Participants
  • Parent commits 8999319

Comments (0)

Files changed (1)

File example/libxml.xml

 
 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>
 
+<method name="getLocalName" synopsis="$localname = $ns->getLocalName()">
+  Alias for prefix()
+</method>
+
 <method name="getData" synopsis="print $ns->getData()">
   Returns the URI of the namespace.
 </method>
   Alias for getData()
 </method>
 
+<method name="getNamespaceURI" 
+    synopsis="$known_uri = $ns->getNamespaceURI()">
+  Returns the string "http://www.w3.org/2000/xmlns/"
+</method>
+
+<method name="getPrefix"
+    synopsis="$known_prefix = $ns->getPredix()">
+  Returns the string "xmlns"
+</method>
+
 </description>
 
 </class>