Hi,

If libxml is configured --with-reader and --without-writer there will be
an error when compiling xmlreader.c, as the InnerXml and OuterXml
functions use xmlNodeDump from xmlwriter.c and these functions are not
protected by #ifdef LIBXML_WRITER_ENABLED.

I have attached a simple patch to add the appropriate #ifdefs to
xmlreader.h and xmlreader.c.

Best regards,

Michael

-- 
Print XML with Prince!
http://www.princexml.com
Index: xmlreader.c
===================================================================
RCS file: /cvs/gnome/libxml2/xmlreader.c,v
retrieving revision 1.128
diff -u -r1.128 xmlreader.c
--- xmlreader.c 22 Sep 2005 11:14:43 -0000      1.128
+++ xmlreader.c 27 Nov 2005 03:41:39 -0000
@@ -1625,6 +1625,7 @@
     return(xmlTextReaderRead(reader));
 }
 
+#ifdef LIBXML_WRITER_ENABLED
 /**
  * xmlTextReaderReadInnerXml:
  * @reader:  the xmlTextReaderPtr used
@@ -1665,7 +1666,9 @@
     resbuf = buff->content;
     return resbuf;
 }
+#endif
 
+#ifdef LIBXML_WRITER_ENABLED
 /**
  * xmlTextReaderReadOuterXml:
  * @reader:  the xmlTextReaderPtr used
@@ -1704,6 +1707,7 @@
     xmlBufferFree(buff);
     return resbuf;
 }
+#endif
 
 /**
  * xmlTextReaderReadString:
Index: include/libxml/xmlreader.h
===================================================================
RCS file: /cvs/gnome/libxml2/include/libxml/xmlreader.h,v
retrieving revision 1.34
diff -u -r1.34 xmlreader.h
--- include/libxml/xmlreader.h  10 Jul 2005 19:03:16 -0000      1.34
+++ include/libxml/xmlreader.h  27 Nov 2005 03:41:39 -0000
@@ -121,10 +121,15 @@
  */
 XMLPUBFUN int XMLCALL          
                        xmlTextReaderRead       (xmlTextReaderPtr reader);
+
+#ifdef LIBXML_WRITER_ENABLED
 XMLPUBFUN xmlChar * XMLCALL    
                        xmlTextReaderReadInnerXml       (xmlTextReaderPtr 
reader);
+                       
 XMLPUBFUN xmlChar * XMLCALL    
                        xmlTextReaderReadOuterXml       (xmlTextReaderPtr 
reader);
+#endif
+
 XMLPUBFUN xmlChar * XMLCALL    
                        xmlTextReaderReadString         (xmlTextReaderPtr 
reader);
 XMLPUBFUN int XMLCALL          
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to