Commits

Anonymous committed 766f52b

Changed attribute toString to be ' name="value"' rather than just "value"

Comments (0)

Files changed (3)

         xmlBufferPtr buffer;
         char *ret = NULL;
     CODE:
-        if ( self->type != XML_ATTRIBUTE_NODE ) {
-            buffer = xmlBufferCreate();
-            xmlNodeDump( buffer, self->doc, self, 0, 0 );
-            if ( buffer->content != 0 ) {
-                ret= xmlStrdup( buffer->content );
-                # warn( "x -> %s\n", ret );
-            }
-            xmlBufferFree( buffer );
+        buffer = xmlBufferCreate();
+        xmlNodeDump( buffer, self->doc, self, 0, 0 );
+        if ( buffer->content != 0 ) {
+            ret= xmlStrdup( buffer->content );
+            # warn( "x -> %s\n", ret );
         }
-        else if ( self->children != NULL ) {
-            ret= xmlStrdup( self->children->content ); 
-        }
+        xmlBufferFree( buffer );
         
         if ( self->doc != NULL ) {
             xmlChar *retDecoded = domDecodeString( self->doc->encoding, ret );
 
 
     @list   = $elem->findnodes( 'species/@name' );
-    ok( scalar @list && $list[0]->toString() eq $list[0]->getData() );
+    ok( scalar @list && $list[0]->toString() eq ' name="Camel"' );
 
     my $x = XML::LibXML::Text->new( 1234 );
     if( defined $x ) {
             res = xmlXPathCompiledEval(comp, ctxt);
             xmlXPathFreeCompExpr(comp);
         }
-        
+
         xmlXPathFreeContext(ctxt);
     }
     return res;