Removal of threading problems, update documentation, added SAX tests, Daniel
diff --git a/include/libxml/tree.h b/include/libxml/tree.h
index 3f00aa0..ff6b55f 100644
--- a/include/libxml/tree.h
+++ b/include/libxml/tree.h
@@ -241,6 +241,18 @@
 typedef xmlDoc *xmlDocPtr;
 
 /*
+ * A buffer structure
+ */
+
+typedef struct xmlBuffer {
+    CHAR *content;		/* The buffer content UTF8 */
+    unsigned int use;		/* The buffer size used */
+    unsigned int size;		/* The buffer size */
+} _xmlBuffer;
+typedef _xmlBuffer xmlBuffer;
+typedef xmlBuffer *xmlBufferPtr;
+
+/*
  * Variables.
  */
 extern xmlNsPtr baseDTD;
@@ -248,6 +260,17 @@
 extern int xmlIndentTreeOutput;  /* try to indent the tree dumps */
 
 /*
+ * Handling Buffers.
+ */
+
+xmlBufferPtr xmlBufferCreate(void);
+void xmlBufferFree(xmlBufferPtr buf);
+int xmlBufferDump(FILE *file, xmlBufferPtr buf);
+void xmlBufferAdd(xmlBufferPtr buf, const CHAR *str, int len);
+void xmlBufferCat(xmlBufferPtr buf, const CHAR *str);
+void xmlBufferCCat(xmlBufferPtr buf, const char *str);
+
+/*
  * Creating/freeing new structures
  */
 xmlDtdPtr xmlCreateIntSubset(xmlDocPtr doc, const CHAR *name,
@@ -337,8 +360,8 @@
 /*
  * Internal, don't use
  */
-void xmlBufferWriteCHAR(const CHAR *string);
-void xmlBufferWriteChar(const char *string);
+void xmlBufferWriteCHAR(xmlBufferPtr buf, const CHAR *string);
+void xmlBufferWriteChar(xmlBufferPtr buf, const char *string);
 
 /*
  * Saving