|
@@ -1026,12 +1026,32 @@ int main( int argc, const char ** argv )
|
|
|
text->InsertEndChild(tag);
|
|
text->InsertEndChild(tag);
|
|
|
XMLText* tagText = doc0.NewText("Tag");
|
|
XMLText* tagText = doc0.NewText("Tag");
|
|
|
tag->InsertEndChild(tagText);
|
|
tag->InsertEndChild(tagText);
|
|
|
|
|
+ tag = doc0.NewElement("tagtwo");
|
|
|
|
|
+ tag->SetAttribute("two", "2");
|
|
|
|
|
+ text->InsertEndChild(tag);
|
|
|
|
|
+ tagText = doc0.NewText("TagTwo");
|
|
|
|
|
+ tag->InsertEndChild(tagText);
|
|
|
XMLText* aftText = doc0.NewText(" After");
|
|
XMLText* aftText = doc0.NewText(" After");
|
|
|
text->InsertEndChild(aftText);
|
|
text->InsertEndChild(aftText);
|
|
|
|
|
|
|
|
XMLPrinter printer;
|
|
XMLPrinter printer;
|
|
|
doc0.Print( &printer );
|
|
doc0.Print( &printer );
|
|
|
- XMLTest( "Selective text wrapping", "<root>\n <text>Before <tag>Tag</tag> After</text>\n</root>\n", printer.CStr() );
|
|
|
|
|
|
|
+ XMLTest( "Selective text wrapping", "<root>\n <text>Before <tag>Tag</tag><tagtwo two=\"2\">TagTwo</tagtwo> After</text>\n</root>\n", printer.CStr() );
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ {
|
|
|
|
|
+ XMLDocument doc0;
|
|
|
|
|
+ XMLElement* root = doc0.NewElement("root");
|
|
|
|
|
+ doc0.InsertEndChild(root);
|
|
|
|
|
+ XMLElement* cool = doc0.NewElement("cool");
|
|
|
|
|
+ cool->SetForceCompactMode(true);
|
|
|
|
|
+ root->InsertEndChild(cool);
|
|
|
|
|
+ XMLElement* tag = doc0.NewElement("true");
|
|
|
|
|
+ cool->InsertEndChild(tag);
|
|
|
|
|
+
|
|
|
|
|
+ XMLPrinter printer;
|
|
|
|
|
+ doc0.Print( &printer );
|
|
|
|
|
+ XMLTest( "Selective text around single tag", "<root>\n <cool><true/></cool>\n</root>\n", printer.CStr() );
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
{
|
|
{
|