added whitespace=collapse support. tests work. code needs review
diff --git a/xmltest.cpp b/xmltest.cpp
index 81018aa..f48fce8 100644
--- a/xmltest.cpp
+++ b/xmltest.cpp
@@ -938,6 +938,25 @@
XMLTest( "QueryBoolText", boolValue, true, false );
}
+ // ----------- Whitespace ------------
+ {
+ const char* xml = "<element>"
+ "<a> This \nis ' text ' </a>"
+ "<b> This is ' text ' \n</b>"
+ "<c>This is ' \n\n text '</c>"
+ "</element>";
+ XMLDocument doc( true, COLLAPSE_WHITESPACE );
+ doc.Parse( xml );
+
+ const XMLElement* element = doc.FirstChildElement();
+ for( const XMLElement* parent = element->FirstChildElement();
+ parent;
+ parent = parent->NextSiblingElement() )
+ {
+ XMLTest( "Whitespace collapse", "This is ' text '", parent->GetText() );
+ }
+ }
+
// ----------- Performance tracking --------------
{