The rest of the test cases. Some bugs, but should be a complete set.
diff --git a/tinyxml2.h b/tinyxml2.h
index a1f7603..7185472 100644
--- a/tinyxml2.h
+++ b/tinyxml2.h
@@ -375,8 +375,8 @@
 	static const char* ReadBOM( const char* p, bool* hasBOM );

 	// p is the starting location,

 	// the UTF-8 value of the entity will be placed in value, and length filled in.

-	static const char* GetCharacterRef( const char* p, char* value, int* length );
-	static void ConvertUTF32ToUTF8( unsigned long input, char* output, int* length );
+	static const char* GetCharacterRef( const char* p, char* value, int* length );

+	static void ConvertUTF32ToUTF8( unsigned long input, char* output, int* length );

 };

 

 

@@ -587,7 +587,9 @@
 	ERROR_PARSING_CDATA,

 	ERROR_PARSING_COMMENT,

 	ERROR_PARSING_DECLARATION,

-	ERROR_PARSING_UNKNOWN

+	ERROR_PARSING_UNKNOWN,

+	ERROR_EMPTY_DOCUMENT,

+	ERROR_MISMATCHED_ELEMENT

 };

 

 

@@ -714,6 +716,8 @@
 	void SaveFile( const char* filename );

 

 	bool HasBOM() const { return writeBOM; }

+	XMLElement* RootElement()				{ return FirstChildElement(); }

+	const XMLElement* RootElement() const	{ return FirstChildElement(); }

 

 	void Print( XMLStreamer* streamer=0 );

 	virtual bool Accept( XMLVisitor* visitor ) const;