Commits

Anonymous committed 3024749

Modified Files:
LibXML.xs
+ XML::LibXML::Node::nodePath()
returns the XPath of a node

  • Participants
  • Parent commits b1f90bc

Comments (0)

Files changed (1)

         }
     OUTPUT:
         RETVAL
+
+
+SV * 
+nodePath( self )
+        xmlNodePtr self
+    PREINIT:
+        xmlChar * path = NULL;
+    CODE:
+        path = xmlGetNodePath( self );
+        if ( path == NULL ) {
+            croak( "cannot calculate path for the given node" );
+        }
+        RETVAL = nodeC2Sv( path, self );
+    OUTPUT:
+        RETVAL
         
 MODULE = XML::LibXML         PACKAGE = XML::LibXML::Element