ph...@9ae0c189-cd1f-4510-a509-f4891f5cf20d  committed c93c189

Modified Files:
Tag: mm_fix
version updates

+ more docs :)

+ now creates the correct filenames on "make docs"

  • Participants
  • Parent commits d8b0de9
  • Branches mm_fix

Comments (0)

Files changed (4)

    - made parse_xml_chunk() reporting errors
    - DOM API is more Level 3 conform
    - fixed the PI interface
+   - example 
+   - namespace fixes
    - new parsefunction: $parser->parse_xml_chunk($string);

File example/libxml.xml

 <module name="XML::LibXML">
-    <version>1.41</version>
+    <version>1.49</version>
         <author>Matt Sergeant</author>
         <author>Christian Glahn</author>
                 XML::LibXML's DOM implementation tries to follow the
                 various DOM specs although not all interfaces are
                 implemented yet. Also there some efford is taken to
-                also to follow the XPath DOM extensions.
+                also to follow the XPath DOM extensions. There are 
+                many functions that are specified for DOM and already 
+		present in XML::LibXML's DOM API, but still not 
+                documented.
+            <p>
+		Although XML::LibXML provides the more important interfaces 
+                to node structures, there are not all node types implemented 
+                (yet). The more common functions are provided by 
+                XML::LibXML::Node, so it should be possible to access most 
+		parts of the document. Since XML::LibXML wraps only the 
+		document structure provided by libxml2, XML::LibXML::Node 
+		will not work properly with nodes found in a DTD, since they
+		are not nodes in context of libxml2. 
+            </p>
+            <p>
+                Besides that XML::LibXML's DOM Api should provide
+                a more perlish interface to the DOM structure libxml2 
+                generates. 
+            </p>
     <package name="XML::LibXML::Document">
                 (e.g. with $CLASS->new()), the <em>toString</em>
                 function may not return the expected result.
+            <p><st>NOTE:</st> XML::LibXML magic encoding may not work 
+               on all plattforms. Some platforms are known to have a broken
+               iconv(), which is partly used by libxml2.
+            </p>
                 This seems like a limitation as long UTF8 encoding is
                 assured. If iso encoded strings come into play it is
                     not be copied, but removed from the original
+                <p>
+		<st>NOTE:</st> Don't try to use importNode() to import 
+		subtrees that contain an entity reference - even if 
+		the entity reference is the root node of the subtree. 
+		This will cause serious problems to your program. This is
+		a limitation of libxml2 and not of XML::LibXML itself.
+		</p>
+            <method name="isSameNode"
+                    synopsis="$bool = $node->isSameNode( $other_node );">
+                <p>
+                    returns TRUE (1) if the given nodes refer to the same
+                    nodestructure, otherwise FALSE (0) is returned.
+                </p>
+            </method>
             <method name="isEqual"
                     synopsis="$bool = $node->isEqual( $other_node );">
-                    returns TRUE (1) if documents refer to the same
-                    nodestructure, otherwise FALSE (0) is returned.
+                   depraced version of isSameNode().
+		<p><st>NOTE</st> isEqual will change behaviour to 
+		   follow the DOM specification</p>
             <method name="getData" synopsis="$content = $node->getData()">
                     imported first.
+            <method name="replaceNode" synopsis="$node->replaceNode($newNode);">
+		<p>
+		    This function is very similar to replaceChild(), but it 
+		    replaces the node itself rather than a childnode. This is 
+		    useful if a node found by any XPath function, should be 
+                    replaced.
+		</p>
+            </method>
             <method name="appendChild"
                     synopsis="$childnode = $node->appendChild( $childnode )">
+            <method name="addSibling" synopsis="$node->addSibling($newNode);">
+                <p>
+		    addSibling() allows to add an additional node to the end of 
+                    a nodelist, defined by the given node.
+		</p>
+	    </method>
             <method name="cloneNode" 
                     synopsis="$newnode =$node->cloneNode( $deep )">
                     $deep is 0 only the current node will be copied.
+            <method name="attributes" synopsis="@attrs =$node->attributes;">
+		<p>
+		    This function returns all attributes assigned to the 
+                    given node. if this function is called in scalar context, 
+		    it will return a XML::LibXML::NodeList.  
+		</p>
+            </method>
             <method name="getParentNode" 
                     synopsis="$parentnode = $node->getParentNode();">
-            <method name="getAttributes"
-                    synopsis="@attributelist = $node->getAttributes;">
-                <p>
-                    returns all attribute nodes of the current node. 
-                </p>
-            </method>
-            <method name="attributes"
-                    synopsis="@attributelist = $node->attributes;">
-                <p>
-                    Alias for <st>getAttributes()</st>
-                </p>
-            </method>
             <method name="getAttributesNS" 
                     synopsis="@attributelist = $node->attributesNS( $URI );">
                     returns all attributes for the given namespace.
+                    (not implemented yet)

File example/

     # open traget file
     my $fn = $node->getAttribute("name") . ".pod";
+    $fn =~ s/^XML::LibXML::// if $target_dir =~ /XML\/LibXML\//;
     open(OSTDOUT , ">&STDOUT");
     open(STDOUT,"> $target_dir/$fn")|| die "cannot create file $fn ($!)";