added new test for BOM, and added good defaults for NewDeclaration

This commit is contained in:
Lee Thomason
2012-04-28 14:37:11 -07:00
parent 0aa8a80fd7
commit f68c438ee2
4 changed files with 25 additions and 4 deletions

View File

@@ -1351,7 +1351,7 @@ XMLDeclaration* XMLDocument::NewDeclaration( const char* str )
{
XMLDeclaration* dec = new (commentPool.Alloc()) XMLDeclaration( this );
dec->memPool = &commentPool;
dec->SetValue( str );
dec->SetValue( str ? str : "xml version=\"1.0\" encoding=\"UTF-8\"" );
return dec;
}