Lines Matching +full:fuzz +full:- +full:issue +full:- +full:has +full:- +full:question
164 XMLElement* titleElement = doc.FirstChildElement( "PLAY" )->FirstChildElement( "TITLE" ); in example_3()
165 const char* title = titleElement->GetText(); in example_3()
168 XMLText* textNode = titleElement->FirstChild()->ToText(); in example_3()
169 title = textNode->Value(); in example_3()
255 …XMLElement* attributeApproachElement = doc.FirstChildElement()->FirstChildElement( "attributeAppro… in example_4()
256 attributeApproachElement->QueryIntAttribute( "v", &v0 ); in example_4()
258 XMLElement* textApproachElement = doc.FirstChildElement()->FirstChildElement( "textApproach" ); in example_4()
259 textApproachElement->FirstChildElement( "v" )->QueryIntText( &v1 ); in example_4()
268 There are fundamentally 2 ways of writing a key-value
279 TinyXML-2 has accessors for both approaches.
319 doc->LoadFile( argv[1] ); in main()
321 int errorID = doc->ErrorID(); in main()
327 printf( "Load time=%u\n", (unsigned)(loadTime - startTime) ); in main()
328 printf( "Delete time=%u\n", (unsigned)(deleteTime - loadTime) ); in main()
329 printf( "Total time=%u\n", (unsigned)(deleteTime - startTime) ); in main()
341 "Properties->Debugging->Working Directory to '..'\n" in main()
353 /* ------ Example 2: Lookup information. ---- */ in main()
361 "<!--comment beside elements--><element><subelement></subelement></element>", in main()
362 …"<!--comment beside elements, this time with spaces--> \n <element> <subelement> \n </subelement… in main()
378 printf( "----------------------------------------------\n" ); in main()
383 static const char* test = "<!--hello world\n" in main()
387 " line 5\r-->"; in main()
396 // This test is pre-test for the next one in main()
430 root->InsertEndChild( newElement ); in main()
436 doc->Parse( test ); in main()
437 XMLTest( "Element with sub element", false, doc->Error() ); in main()
463 // <!--comment--> in main()
470 XMLNode* element = doc->InsertEndChild( doc->NewElement( "element" ) ); in main()
472 …XMLElement* sub[3] = { doc->NewElement( "sub" ), doc->NewElement( "sub" ), doc->NewElement( "sub" … in main()
474 sub[i]->SetAttribute( "attrib", i ); in main()
476 element->InsertEndChild( sub[2] ); in main()
481 XMLNode* comment = element->InsertFirstChild( doc->NewComment( "comment" ) ); in main()
482 comment->SetUserData(&dummyValue); in main()
483 element->InsertAfterChild( comment, sub[0] ); in main()
484 element->InsertAfterChild( sub[0], sub[1] ); in main()
485 sub[2]->InsertFirstChild( doc->NewText( "& Text!" )); in main()
486 doc->Print(); in main()
487 …XMLTest( "Programmatic DOM", "comment", doc->FirstChildElement( "element" )->FirstChild()->Value()… in main()
488 …XMLTest( "Programmatic DOM", "0", doc->FirstChildElement( "element" )->FirstChildElement()->Attrib… in main()
489 …XMLTest( "Programmatic DOM", 2, doc->FirstChildElement()->LastChildElement( "sub" )->IntAttribute(… in main()
491 doc->FirstChildElement()->LastChildElement( "sub" )->FirstChild()->ToText()->Value() ); in main()
492 XMLTest("User data - pointer", true, &dummyValue == comment->GetUserData(), false); in main()
493 XMLTest("User data - value behind pointer", dummyInitialValue, dummyValue, false); in main()
496 element->DeleteChild( sub[2] ); in main()
497 doc->DeleteNode( comment ); in main()
499 element->FirstChildElement()->SetAttribute( "attrib", true ); in main()
500 element->LastChildElement()->DeleteAttribute( "attrib" ); in main()
502 …XMLTest( "Programmatic DOM", true, doc->FirstChildElement()->FirstChildElement()->BoolAttribute( "… in main()
506 …int value2 = doc->FirstChildElement()->LastChildElement()->IntAttribute( "attrib", replacementIntV… in main()
507 …XMLError result = doc->FirstChildElement()->LastChildElement()->QueryIntAttribute( "attrib", &valu… in main()
512 doc->Print(); in main()
516 doc->Print( &streamer ); in main()
521 doc->Print( &streamer ); in main()
524 doc->SaveFile( "./resources/out/pretty.xml" ); in main()
525 XMLTest( "Save pretty.xml", false, doc->Error() ); in main()
526 doc->SaveFile( "./resources/out/compact.xml", true ); in main()
527 XMLTest( "Save compact.xml", false, doc->Error() ); in main()
544 doc.FirstChild()->ToDeclaration()->Value() ); in main()
545 XMLTest( "Dream", true, doc.FirstChild()->NextSibling()->ToUnknown() != 0 ); in main()
547 doc.FirstChild()->NextSibling()->ToUnknown()->Value() ); in main()
549 doc.LastChild()->LastChild()->LastChild()->LastChild()->LastChildElement()->GetText() ); in main()
551 doc.LastChild()->LastChild()->LastChild()->LastChild()->LastChildElement()->GetText() ); in main()
556 XMLTest( "Dream-out", "xml version=\"1.0\"", in main()
557 doc2.FirstChild()->ToDeclaration()->Value() ); in main()
558 XMLTest( "Dream-out", true, doc2.FirstChild()->NextSibling()->ToUnknown() != 0 ); in main()
559 XMLTest( "Dream-out", "DOCTYPE PLAY SYSTEM \"play.dtd\"", in main()
560 doc2.FirstChild()->NextSibling()->ToUnknown()->Value() ); in main()
561 XMLTest( "Dream-out", "And Robin shall restore amends.", in main()
562 doc2.LastChild()->LastChild()->LastChild()->LastChild()->LastChildElement()->GetText() ); in main()
564 //gNewTotal = gNew - newStart; in main()
596 result = ele->QueryDoubleAttribute( "attr0", &dVal ); in main()
599 XMLTest( "Query attribute: int as double", 1, (int)ele->DoubleAttribute("attr0")); in main()
601 result = ele->QueryDoubleAttribute( "attr1", &dVal ); in main()
604 XMLTest( "Query attribute: double as double", 2.0, ele->DoubleAttribute("attr1") ); in main()
606 result = ele->QueryIntAttribute( "attr1", &iVal ); in main()
610 result = ele->QueryIntAttribute( "attr2", &iVal ); in main()
612 XMLTest( "Query attribute: not a number", 4.0, ele->DoubleAttribute("attr2", 4.0) ); in main()
614 result = ele->QueryIntAttribute( "bar", &iVal ); in main()
616 XMLTest( "Query attribute: does not exist", true, ele->BoolAttribute("bar", true) ); in main()
631 ele->SetAttribute( "str", "strValue" ); in main()
632 ele->SetAttribute( "int", 1 ); in main()
633 ele->SetAttribute( "double", -1.0 ); in main()
636 ele->QueryAttribute("str", &answer); in main()
639 const char* cStr = ele->Attribute( "str" ); in main()
641 XMLError queryResult = ele->QueryIntAttribute( "int", &iVal ); in main()
645 XMLError queryResult = ele->QueryDoubleAttribute( "double", &dVal ); in main()
650 XMLError queryResult = ele->QueryAttribute( "int", &iVal2 ); in main()
654 XMLError queryResult = ele->QueryAttribute( "double", &dVal2 ); in main()
658 XMLTest( "Attribute match test", "strValue", ele->Attribute( "str", "strValue" ) ); in main()
659 XMLTest( "Attribute round trip. c-string.", "strValue", cStr ); in main()
661 XMLTest( "Attribute round trip. double.", -1, (int)dVal ); in main()
664 XMLTest( "Alternate query", true, iVal == ele->IntAttribute("int") ); in main()
665 XMLTest( "Alternate query", true, dVal == ele->DoubleAttribute("double") ); in main()
674 XMLElement* element = doc.FirstChildElement( "document" )->FirstChildElement( "Russian" ); in main()
678 XMLTest( "UTF-8: Russian value.", (const char*)correctValue, element->Attribute( "value" ) ); in main()
686 …ext = doc.FirstChildElement( "document" )->FirstChildElement( (const char*) russianElementName )->… in main()
687 XMLTest( "UTF-8: Browsing russian element name.", in main()
689 text->Value() ); in main()
693 XMLTest( "UTF-8: Save testout.xml", false, doc.Error() ); in main()
699 XMLTest( "UTF-8: Open utf8testout.xml", true, saved != 0 ); in main()
702 XMLTest( "UTF-8: Open utf8testverify.xml", true, verify != 0 ); in main()
728 XMLTest( "UTF-8: Verified multi-language round trip.", true, roundTripOkay ); in main()
731 // --------GetText()----------- in main()
739 XMLTest( "GetText() normal use.", "This is text", element->GetText() ); in main()
746 XMLTest( "GetText() contained element.", element->GetText() == 0, true ); in main()
750 // --------SetText()----------- in main()
758 element->SetText("darkness."); in main()
759 XMLTest( "SetText() normal use (open/close).", "darkness.", element->GetText() ); in main()
761 element->SetText("blue flame."); in main()
762 XMLTest( "SetText() replace.", "blue flame.", element->GetText() ); in main()
766 XMLTest( "Empty self-closed element", false, doc.Error() ); in main()
769 element->SetText("The driver"); in main()
770 XMLTest( "SetText() normal use. (self-closing)", "The driver", element->GetText() ); in main()
772 element->SetText("<b>horses</b>"); in main()
773 XMLTest( "SetText() replace with tag-like text.", "<b>horses</b>", element->GetText() ); in main()
781 element->SetText("wolves"); in main()
782 XMLTest( "SetText() prefix to nested non-text children.", "wolves", element->GetText() ); in main()
786 XMLTest( "Empty self-closed element round 2", false, doc.Error() ); in main()
789 element->SetText( "str" ); in main()
790 XMLTest( "SetText types", "str", element->GetText() ); in main()
792 element->SetText( 1 ); in main()
793 XMLTest( "SetText types", "1", element->GetText() ); in main()
795 element->SetText( 1U ); in main()
796 XMLTest( "SetText types", "1", element->GetText() ); in main()
798 element->SetText( true ); in main()
799 XMLTest( "SetText types", "true", element->GetText() ); in main()
801 element->SetText( 1.5f ); in main()
802 XMLTest( "SetText types", "1.5", element->GetText() ); in main()
804 element->SetText( 1.5 ); in main()
805 XMLTest( "SetText types", "1.5", element->GetText() ); in main()
808 // ---------- Attributes --------- in main()
810 static const int64_t BIG = -123456789012345678; in main()
817 element->SetAttribute("attrib", int(-100)); in main()
820 XMLError queryResult = element->QueryIntAttribute("attrib", &v); in main()
822 XMLTest("Attribute: int", -100, v, true); in main()
826 XMLError queryResult = element->QueryAttribute("attrib", &v); in main()
828 XMLTest("Attribute: int", -100, v, true); in main()
830 XMLTest("Attribute: int", -100, element->IntAttribute("attrib"), true); in main()
833 element->SetAttribute("attrib", unsigned(100)); in main()
836 XMLError queryResult = element->QueryUnsignedAttribute("attrib", &v); in main()
842 XMLError queryResult = element->QueryAttribute("attrib", &v); in main()
848 XMLError queryResult = element->QueryStringAttribute("not-attrib", &v); in main()
850 queryResult = element->QueryStringAttribute("attrib", &v); in main()
854 XMLTest("Attribute: unsigned", unsigned(100), element->UnsignedAttribute("attrib"), true); in main()
857 element->SetAttribute("attrib", BIG); in main()
860 XMLError queryResult = element->QueryInt64Attribute("attrib", &v); in main()
866 XMLError queryResult = element->QueryAttribute("attrib", &v); in main()
870 XMLTest("Attribute: int64_t", BIG, element->Int64Attribute("attrib"), true); in main()
873 element->SetAttribute("attrib", BIG_POS); in main()
876 XMLError queryResult = element->QueryUnsigned64Attribute("attrib", &v); in main()
882 XMLError queryResult = element->QueryAttribute("attrib", &v); in main()
886 XMLTest("Attribute: uint64_t", BIG_POS, element->Unsigned64Attribute("attrib"), true); in main()
889 element->SetAttribute("attrib", true); in main()
892 XMLError queryResult = element->QueryBoolAttribute("attrib", &v); in main()
898 XMLError queryResult = element->QueryAttribute("attrib", &v); in main()
902 XMLTest("Attribute: bool", true, element->BoolAttribute("attrib"), true); in main()
905 element->SetAttribute("attrib", true); in main()
906 const char* result = element->Attribute("attrib"); in main()
910 element->SetAttribute("attrib", true); in main()
911 result = element->Attribute("attrib"); in main()
917 element->SetAttribute("attrib", 100.0); in main()
920 XMLError queryResult = element->QueryDoubleAttribute("attrib", &v); in main()
926 XMLError queryResult = element->QueryAttribute("attrib", &v); in main()
930 XMLTest("Attribute: double", 100.0, element->DoubleAttribute("attrib"), true); in main()
933 element->SetAttribute("attrib", 100.0f); in main()
936 XMLError queryResult = element->QueryFloatAttribute("attrib", &v); in main()
942 XMLError queryResult = element->QueryAttribute("attrib", &v); in main()
946 XMLTest("Attribute: float", 100.0f, element->FloatAttribute("attrib"), true); in main()
949 element->SetText(BIG); in main()
951 XMLError queryResult = element->QueryInt64Text(&v); in main()
956 element->SetText(BIG_POS); in main()
958 XMLError queryResult = element->QueryUnsigned64Text(&v); in main()
964 // ---------- XMLPrinter stream mode ------ in main()
971 printer.PushAttribute("attrib-text", "text"); in main()
972 printer.PushAttribute("attrib-int", int(1)); in main()
973 printer.PushAttribute("attrib-unsigned", unsigned(2)); in main()
974 printer.PushAttribute("attrib-int64", int64_t(3)); in main()
975 printer.PushAttribute("attrib-uint64", uint64_t(37)); in main()
976 printer.PushAttribute("attrib-bool", true); in main()
977 printer.PushAttribute("attrib-double", 4.0); in main()
988 const XMLAttribute* attrib = cdoc.FirstChildElement("foo")->FindAttribute("attrib-text"); in main()
989 XMLTest("attrib-text", "text", attrib->Value(), true); in main()
990 attrib = cdoc.FirstChildElement("foo")->FindAttribute("attrib-int"); in main()
991 XMLTest("attrib-int", int(1), attrib->IntValue(), true); in main()
992 attrib = cdoc.FirstChildElement("foo")->FindAttribute("attrib-unsigned"); in main()
993 XMLTest("attrib-unsigned", unsigned(2), attrib->UnsignedValue(), true); in main()
994 attrib = cdoc.FirstChildElement("foo")->FindAttribute("attrib-int64"); in main()
995 XMLTest("attrib-int64", int64_t(3), attrib->Int64Value(), true); in main()
996 attrib = cdoc.FirstChildElement("foo")->FindAttribute("attrib-uint64"); in main()
997 XMLTest("attrib-uint64", uint64_t(37), attrib->Unsigned64Value(), true); in main()
998 attrib = cdoc.FirstChildElement("foo")->FindAttribute("attrib-bool"); in main()
999 XMLTest("attrib-bool", true, attrib->BoolValue(), true); in main()
1000 attrib = cdoc.FirstChildElement("foo")->FindAttribute("attrib-double"); in main()
1001 XMLTest("attrib-double", 4.0, attrib->DoubleValue(), true); in main()
1008 printer.PushDeclaration("version = '1.0' enconding = 'utf-8'"); in main()
1011 printer.PushAttribute("attrib-text", "text"); in main()
1062 text_value = root->FirstChildElement("text")->GetText(); in main()
1066 int_value = root->FirstChildElement("int")->IntText(); in main()
1070 unsigned_value = root->FirstChildElement("unsigned")->UnsignedText(); in main()
1074 int64_t_value = root->FirstChildElement("int64_t")->Int64Text(); in main()
1078 uint64_t_value = root->FirstChildElement("uint64_t")->Unsigned64Text(); in main()
1082 float_value = root->FirstChildElement("float")->FloatText(); in main()
1086 double_value = root->FirstChildElement("double")->DoubleText(); in main()
1090 bool_value = root->FirstChildElement("bool")->BoolText(); in main()
1093 const XMLComment* comment = root->FirstChildElement("comment")->FirstChild()->ToComment(); in main()
1094 const char* comment_value = comment->Value(); in main()
1097 const XMLDeclaration* declaration = cdoc.FirstChild()->ToDeclaration(); in main()
1098 const char* declaration_value = declaration->Value(); in main()
1099 XMLTest("PushDeclaration() test", "version = '1.0' enconding = 'utf-8'", declaration_value); in main()
1104 // ---------- CDATA --------------- in main()
1118 doc.FirstChildElement()->FirstChild()->Value(), in main()
1122 // ----------- CDATA ------------- in main()
1137 doc.FirstChildElement()->FirstChild()->Value(), in main()
1151 XMLNode* childNode0 = parent->InsertEndChild( childText0 ); in main()
1153 XMLNode* childNode1 = parent->InsertAfterChild( childNode0, childText1 ); in main()
1156 XMLTest( "Test InsertAfterChild on empty node. ", true, ( childNode1 == parent->LastChild() ) ); in main()
1166 "<psg context=\"Line 5 has "quotation marks" and 'apostrophe marks'." in main()
1167 " It also has <, >, and &, as well as a fake copyright ©.\"> </psg>" in main()
1173 XMLElement* psg = doc.RootElement()->FirstChildElement(); in main()
1174 const char* context = psg->Attribute( "context" ); in main()
1175 …const char* expected = "Line 5 has \"quotation marks\" and 'apostrophe marks'. It also has <, >, a… in main()
1185 bool acceptResult = psg->Accept( &streamer ); in main()
1197 "<psg context=\"Line 5 has "quotation marks" and 'apostrophe marks'." in main()
1198 " It also has <, >, and &, as well as a fake copyright \xC2\xA9.\"/>\n", in main()
1209 …"<psg context=\"Line 5 has "quotation marks" and 'apostrophe marks'.\">Crazy &… in main()
1217 "Line 5 has "quotation marks" and 'apostrophe marks'.", in main()
1218 doc.FirstChildElement()->FirstChildElement()->Attribute( "context" ) ); in main()
1220 doc.FirstChildElement()->FirstChildElement()->FirstChild()->Value() ); in main()
1230 XMLTest( "dot in names", "a.elem", doc.FirstChildElement()->Name() ); in main()
1231 XMLTest( "dot in names", "2.0", doc.FirstChildElement()->Attribute( "xmi.version" ) ); in main()
1241 XMLText* text = doc.FirstChildElement()->FirstChildElement()->FirstChild()->ToText(); in main()
1243 "1.1 Start easy ignore fin thickness\n", text->Value(), in main()
1267 const XMLUnknown* decl = doc.FirstChild()->NextSibling()->ToUnknown(); in main()
1268 XMLTest( "Correct value of unknown.", "DOCTYPE PLAY SYSTEM 'play.dtd'", decl->Value() ); in main()
1275 "<!-- Somewhat<evil> -->"; in main()
1280 XMLComment* comment = doc.FirstChild()->ToComment(); in main()
1282 XMLTest( "Comment formatting.", " Somewhat<evil> ", comment->Value() ); in main()
1332 XMLTest( "Low entities.", result, doc.FirstChildElement()->GetText() ); in main()
1358 xml.Parse("<!-- declarations for <head> & <body> -->" in main()
1359 "<!-- far & away -->" ); in main()
1363 XMLNode* e1 = e0->NextSibling(); in main()
1364 XMLComment* c0 = e0->ToComment(); in main()
1365 XMLComment* c1 = e1->ToComment(); in main()
1367 XMLTest( "Comments ignore entities.", " declarations for <head> & <body> ", c0->Value(), true ); in main()
1368 XMLTest( "Comments ignore entities.", " far & away ", c1->Value(), true ); in main()
1375 "<!-- With this comment, child2 will not be parsed! -->" in main()
1383 for( XMLNode* ele = xml.FirstChildElement( "Parent" )->FirstChild(); in main()
1385 ele = ele->NextSibling() ) in main()
1395 …unsigned char buf[] = "<?xml version=\"1.0\" encoding=\"utf-8\"?><feed><![CDATA[Test XMLblablablal… in main()
1407 // Actually not malformed - should work. in main()
1422 const char* pub = "<?xml version='1.0'?> <element><sub/></element> <!--comment--> <!DOCTYPE>"; in main()
1428 for( const XMLNode* node=doc.FirstChild(); node; node=node->NextSibling() ) { in main()
1429 XMLNode* copy = node->ShallowClone( &clone ); in main()
1438 for( ; a && b; a=a->NextSibling(), b=b->NextSibling() ) { in main()
1440 XMLTest( "Clone and Equal", true, a->ShallowEqual( b )); in main()
1454 " <!-- comment thing -->" in main()
1462 XMLNode* root = doc.RootElement()->DeepClone(&doc2); in main()
1481 " <!-- comment thing -->" in main()
1488 const XMLElement* subElement = doc.FirstChildElement("root")->FirstChildElement("child2"); in main()
1489 bool acceptResult = subElement->Accept(&printer1); in main()
1492 XMLNode* clonedSubElement = subElement->DeepClone(&doc2); in main()
1498 XMLTest("Deep clone of sub-element.", printer1.CStr(), printer2.CStr(), true); in main()
1509 "<!-- Top level comment. -->" in main()
1512 " <!-- comment thing -->" in main()
1547 const XMLAttribute* a = ele->FirstAttribute(); in main()
1548 XMLTest( "Attribute order", "1", a->Value() ); in main()
1549 a = a->Next(); in main()
1550 XMLTest( "Attribute order", "2", a->Value() ); in main()
1551 a = a->Next(); in main()
1552 XMLTest( "Attribute order", "3", a->Value() ); in main()
1553 XMLTest( "Attribute order", "attrib3", a->Name() ); in main()
1555 ele->DeleteAttribute( "attrib2" ); in main()
1556 a = ele->FirstAttribute(); in main()
1557 XMLTest( "Attribute order", "1", a->Value() ); in main()
1558 a = a->Next(); in main()
1559 XMLTest( "Attribute order", "3", a->Value() ); in main()
1561 ele->DeleteAttribute( "attrib1" ); in main()
1562 ele->DeleteAttribute( "attrib3" ); in main()
1563 XMLTest( "Attribute order (empty)", true, ele->FirstAttribute() == 0 ); in main()
1583 XMLTest( "Attribute with space #1", "Test Attribute", ele->Attribute( "attribute1" ) ); in main()
1585 XMLTest( "Attribute with space #2", "Test Attribute", ele->Attribute( "attribute1" ) ); in main()
1587 XMLTest( "Attribute with space #3", "Test Attribute", ele->Attribute( "attribute1" ) ); in main()
1596 XMLElement* ele0 = doc.FirstChildElement()->FirstChildElement(); in main()
1597 XMLElement* ele1 = ele0->NextSiblingElement(); in main()
1598 bool equal = ele0->ShallowEqual( ele1 ); in main()
1603 // -------- Handles ------------ in main()
1612 XMLTest( "Handle, non-const, element is found", true, ele != 0 ); in main()
1613 XMLTest( "Handle, non-const, element name matches", "sub", ele->Value() ); in main()
1619 XMLTest( "Handle, non-const, element not found", true, ele == 0 ); in main()
1625 XMLTest( "Handle, const, element name matches", "sub", ele->Value() ); in main()
1643 static const char* result = "\xef\xbb\xbf<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; in main()
1656 const char* xml = "<point> <IntText>-24</IntText> <UnsignedText>42</UnsignedText> \ in main()
1662 int test1 = pointElement->FirstChildElement("IntText")->IntText(); in main()
1663 XMLTest("IntText() test", -24, test1); in main()
1665 unsigned test2 = pointElement->FirstChildElement("UnsignedText")->UnsignedText(); in main()
1668 int64_t test3 = pointElement->FirstChildElement("Int64Text")->Int64Text(); in main()
1671 double test4 = pointElement->FirstChildElement("DoubleText")->DoubleText(); in main()
1674 float test5 = pointElement->FirstChildElement("DoubleText")->FloatText(); in main()
1677 bool test6 = pointElement->FirstChildElement("BoolText")->BoolText(); in main()
1689 int test1 = pointElement->FirstChildElement("IntText")->IntText(); in main()
1692 unsigned test2 = pointElement->FirstChildElement("UnsignedText")->UnsignedText(); in main()
1695 int64_t test3 = pointElement->FirstChildElement("Int64Text")->Int64Text(); in main()
1707 const XMLNode* PropertyNode = PlaylistNode->FirstChildElement(); in main()
1709 result = PlaylistNode->ShallowEqual(PropertyNode); in main()
1711 result = PlaylistNode->ShallowEqual(PlaylistNode); in main()
1726 const XMLElement* pre = ElementPlaylist->PreviousSiblingElement(); in main()
1728 …const XMLElement* ElementBlank = ElementPlaylist->FirstChildElement("entry")->NextSiblingElement("… in main()
1730 const XMLElement* next = ElementBlank->NextSiblingElement(); in main()
1732 const XMLElement* ElementEntry = ElementBlank->PreviousSiblingElement("entry"); in main()
1747 XMLError queryResult = pointElement->FirstChildElement( "y" )->QueryIntText( &intValue ); in main()
1754 …XMLError queryResult = pointElement->FirstChildElement( "y" )->QueryUnsignedText( &unsignedValue ); in main()
1761 XMLError queryResult = pointElement->FirstChildElement( "x" )->QueryFloatText( &floatValue ); in main()
1768 XMLError queryResult = pointElement->FirstChildElement( "x" )->QueryDoubleText( &doubleValue ); in main()
1775 XMLError queryResult = pointElement->FirstChildElement( "valid" )->QueryBoolText( &boolValue ); in main()
1782 const char* xml = "<element><_sub/><:sub/><sub:sub/><sub-sub/></element>"; in main()
1785 XMLTest( "Non-alpha element lead letter parses.", false, doc.Error() ); in main()
1792 XMLTest("Non-alpha attribute lead character parses.", false, doc.Error()); in main()
1816 XMLTest( "Document has something to Clear()", false, doc.NoChildren() ); in main()
1831 // ----------- Whitespace ------------ in main()
1843 for( const XMLElement* parent = element->FirstChildElement(); in main()
1845 parent = parent->NextSiblingElement() ) in main()
1847 XMLTest( "Whitespace collapse", "This is ' text '", parent->GetText() ); in main()
1860 root->SetAttribute("version", 2); in main()
1869 XMLTest( "Whitespace all space", true, 0 == doc.FirstChildElement()->FirstChild() ); in main()
1872 // ----------- Preserve Whitespace ------------ in main()
1878 XMLTest("Whitespace preserved", "This is ' \n\n text '", doc.FirstChildElement()->GetText()); in main()
1886 XMLTest("Whitespace preserved", " This \nis ' text ' ", doc.FirstChildElement()->GetText()); in main()
1894 XMLTest("Whitespace preserved", " \n This is ' text ' \n", doc.FirstChildElement()->GetText()); in main()
1903 XMLTest("Whitespace preserved", true, 0 == doc.FirstChildElement()->GetText()); in main()
1911 XMLTest("Whitespace preserved", true, 0 == doc.FirstChildElement()->GetText()); in main()
1919 XMLTest("Whitespace preserved", true, 0 == doc.FirstChildElement()->GetText()); in main()
1927 XMLTest("Whitespace preserved", true, 0 == doc.FirstChildElement()->GetText()); in main()
1935 XMLTest("Whitespace preserved", true, 0 == doc.FirstChildElement()->GetText()); in main()
1938 // ----------- Pedantic Whitespace ------------ in main()
1944 XMLTest("Pedantic whitespace", "This is ' \n\n text '", doc.FirstChildElement()->GetText()); in main()
1952 XMLTest("Pedantic whitespace", " This \nis ' text ' ", doc.FirstChildElement()->GetText()); in main()
1960 XMLTest("Pedantic whitespace", " \n This is ' text ' \n", doc.FirstChildElement()->GetText()); in main()
1969 XMLTest("Pedantic whitespace", " ", doc.FirstChildElement()->GetText()); in main()
1977 XMLTest("Pedantic whitespace", " ", doc.FirstChildElement()->GetText()); in main()
1985 XMLTest("Pedantic whitespace", "\n\n", doc.FirstChildElement()->GetText()); in main()
1993 XMLTest("Pedantic whitespace", " \n", doc.FirstChildElement()->GetText()); in main()
2001 XMLTest("Pedantic whitespace", " \n \n ", doc.FirstChildElement()->GetText()); in main()
2010 …XMLTest("Pedantic whitespace", " This is nested text ", doc.RootElement()->FirstChildElement()->Ge… in main()
2018 XMLTest("Pedantic whitespace", " ", doc.RootElement()->FirstChildElement()->GetText()); in main()
2026 XMLTest("Pedantic whitespace", true, 0 == doc.RootElement()->FirstChildElement()->GetText()); in main()
2036 doc.FirstChild()->ToDeclaration()->Value()); in main()
2037 XMLTest("Dream", true, doc.FirstChild()->NextSibling()->ToUnknown() != 0); in main()
2039 doc.FirstChild()->NextSibling()->ToUnknown()->Value()); in main()
2041 doc.LastChild()->LastChild()->LastChild()->LastChild()->LastChildElement()->GetText()); in main()
2049 XMLTest( "Parse with self-closed element", false, doc.Error() ); in main()
2059 XMLTest( "Parse for printing of sub-element", false, doc.Error() ); in main()
2060 XMLElement* ele = doc.FirstChildElement( "parent")->FirstChildElement( "child"); in main()
2063 bool acceptResult = ele->Accept( &printer ); in main()
2064 XMLTest( "Accept of sub-element", true, acceptResult ); in main()
2065 XMLTest( "Printing of sub-element", "<child>abc</child>\n", printer.CStr(), false ); in main()
2108 "<elem>element 1</elem>text<!-- comment -->" in main()
2118 "<elem>element 1</elem>text<!-- comment -->" in main()
2126 "<elem>element 1</elem>text<!-- comment -->" in main()
2135 "<elem>element 1</elem>text<!-- comment -->" in main()
2142 XMLElement* subtree = doc.RootElement()->FirstChildElement("one")->FirstChildElement("subtree"); in main()
2143 XMLElement* two = doc.RootElement()->FirstChildElement("two"); in main()
2144 two->InsertFirstChild(subtree); in main()
2147 XMLTest("Move node from within <one> to <two> - Accept()", true, acceptResult); in main()
2152 subtree = doc.RootElement()->FirstChildElement("one")->FirstChildElement("subtree"); in main()
2153 two = doc.RootElement()->FirstChildElement("two"); in main()
2154 doc.RootElement()->InsertAfterChild(two, subtree); in main()
2157 XMLTest("Move node from within <one> after <two> - Accept()", true, acceptResult); in main()
2162 XMLNode* one = doc.RootElement()->FirstChildElement("one"); in main()
2163 subtree = one->FirstChildElement("subtree"); in main()
2164 doc.RootElement()->InsertAfterChild(one, subtree); in main()
2167 XMLTest("Move node from within <one> after <one> - Accept()", true, acceptResult); in main()
2172 subtree = doc.RootElement()->FirstChildElement("one")->FirstChildElement("subtree"); in main()
2173 two = doc.RootElement()->FirstChildElement("two"); in main()
2174 …XMLTest("<two> is the last child at root level", true, two == doc.RootElement()->LastChildElement(… in main()
2175 doc.RootElement()->InsertEndChild(subtree); in main()
2178 XMLTest("Move node from within <one> after <two> - Accept()", true, acceptResult); in main()
2197 XMLTest( "Parse root-sample-field0", true, doc.Error() ); in main()
2202 // the question being explored is what kind of print to use: in main()
2205 …//const char* xml = "<element attrA='123456789.123456789' attrB='1.001e9' attrC='1.0e-10' attrD='1… in main()
2209 XMLTest( "Parse self-closed empty element", false, doc.Error() ); in main()
2210 doc.FirstChildElement()->SetAttribute( "attrA-f64", 123456789.123456789 ); in main()
2211 doc.FirstChildElement()->SetAttribute( "attrB-f64", 1.001e9 ); in main()
2212 doc.FirstChildElement()->SetAttribute( "attrC-f64", 1.0e9 ); in main()
2213 doc.FirstChildElement()->SetAttribute( "attrC-f64", 1.0e20 ); in main()
2214 doc.FirstChildElement()->SetAttribute( "attrD-f64", 1.0e-10 ); in main()
2215 doc.FirstChildElement()->SetAttribute( "attrD-f64", 0.123456789 ); in main()
2217 doc.FirstChildElement()->SetAttribute( "attrA-f32", 123456789.123456789f ); in main()
2218 doc.FirstChildElement()->SetAttribute( "attrB-f32", 1.001e9f ); in main()
2219 doc.FirstChildElement()->SetAttribute( "attrC-f32", 1.0e9f ); in main()
2220 doc.FirstChildElement()->SetAttribute( "attrC-f32", 1.0e20f ); in main()
2221 doc.FirstChildElement()->SetAttribute( "attrD-f32", 1.0e-10f ); in main()
2222 doc.FirstChildElement()->SetAttribute( "attrD-f32", 0.123456789f ); in main()
2230 …-f64=\"123456789.12345679\" attrB-f64=\"1001000000\" attrC-f64=\"1e+20\" attrD-f64=\"0.123456789\"… in main()
2238 // Issue #184 in main()
2242 const char* xmlText = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><test>"; in main()
2266 XMLTest( "Node document before insertion", true, &doc == root->GetDocument() ); in main()
2268 XMLTest( "Node document after insertion", true, &doc == root->GetDocument() ); in main()
2277 unlinkedRoot->GetDocument()->DeleteNode( linkedRoot ); in main()
2278 unlinkedRoot->GetDocument()->DeleteNode( unlinkedRoot ); in main()
2287 // Issue 291. Should not crash in main()
2297 // Issue 299. Can print elements that are not linked in. in main()
2298 // Will crash if issue not fixed. in main()
2302 bool acceptResult = newElement->Accept( &printer ); in main()
2303 XMLTest( "printme - Accept()", true, acceptResult ); in main()
2308 // Issue 302. Clear errors from LoadFile/SaveFile in main()
2310 XMLTest( "Issue 302. Should be no error initially", "XML_SUCCESS", doc.ErrorName() ); in main()
2312 XMLTest( "Issue 302. Fail to save", "XML_ERROR_FILE_COULD_NOT_BE_OPENED", doc.ErrorName() ); in main()
2314 XMLTest( "Issue 302. Subsequent success in saving", "XML_SUCCESS", doc.ErrorName() ); in main()
2322 doc.LoadFile( "resources/no-such-file.xml" ); in main()
2323 XMLTest( "No such file - should fail", true, doc.Error() ); in main()
2328 doc.LoadFile( "resources/xmltest-5330.xml" ); in main()
2329 XMLTest( "parse errors occur - should fail", true, doc.Error() ); in main()
2338 " <!-- xml version=\"1.1\" -->" in main()
2341 "<?xml-stylesheet type=\"text/xsl\" href=\"Anything.xsl\"?>" in main()
2356 …XMLTest("Test that declaration after self-closed child is not allowed", XML_ERROR_PARSING_DECLARAT… in main()
2364 // No matter - before or after successfully parsing a text - in main()
2367 const char* validXml = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" in main()
2371 XMLTest( "XMLDocument::Value() returns null?", NULL, doc->Value() ); in main()
2372 doc->Parse( validXml ); in main()
2373 XMLTest( "Parse to test XMLDocument::Value()", false, doc->Error()); in main()
2374 XMLTest( "XMLDocument::Value() returns null?", NULL, doc->Value() ); in main()
2418 // have to be tracked using a list. This has a minor performance in main()
2438 "./resources/xmltest-5330.xml", in main()
2439 "./resources/xmltest-4636783552757760.xml", in main()
2440 "./resources/xmltest-5720541257269248.xml", in main()
2451 "./resources/xmltest-5662204197076992.xml", // Security-level performance issue. in main()
2458 XMLTest("Fuzz attack prevented.", true, true); in main()
2488 XMLElement* entry = playlist->FirstChildElement(elementName); in main()
2492 entry = entry->NextSiblingElement(elementName); in main()
2493 playlist->DeleteChild(todelete); in main()
2495 entry = playlist->FirstChildElement(elementName); in main()
2500 XMLElement* blank = playlist->FirstChildElement(elementName); in main()
2504 blank = blank->NextSiblingElement(elementName); in main()
2505 playlist->DeleteChild(todelete); in main()
2511 const bool acceptResult = playlist->Accept(&printer); in main()
2512 XMLTest("Crash bug parsing - Accept()", true, acceptResult); in main()
2518 …for (const XMLElement* p = playlist->FirstChildElement("property"); p; p = p->NextSiblingElement("… in main()
2524 // ----------- Line Number Tracking -------------- in main()
2575 for (const XMLAttribute *attr = firstAttribute; attr != 0; attr = attr->Next()) in main()
2576 Push('A', attr->GetLineNum()); in main()
2610 tester.TestParseError("ErrorLine-Parsing", "\n<root>\n foo \n<unclosed/>", XML_ERROR_PARSING, 2); in main()
2611 …tester.TestParseError("ErrorLine-Declaration", "<root>\n<?xml version=\"1.0\"?>", XML_ERROR_PARSIN… in main()
2612 …tester.TestParseError("ErrorLine-Mismatch", "\n<root>\n</mismatch>", XML_ERROR_MISMATCHED_ELEMENT,… in main()
2613 …tester.TestParseError("ErrorLine-CData", "\n<root><![CDATA[ \n foo bar \n", XML_ERROR_PARSING_CDAT… in main()
2614 tester.TestParseError("ErrorLine-Text", "\n<root>\n foo bar \n", XML_ERROR_PARSING_TEXT, 3); in main()
2615 … tester.TestParseError("ErrorLine-Comment", "\n<root>\n<!-- >\n", XML_ERROR_PARSING_COMMENT, 3); in main()
2616 …tester.TestParseError("ErrorLine-Declaration", "\n<root>\n<? >\n", XML_ERROR_PARSING_DECLARATION, … in main()
2617 tester.TestParseError("ErrorLine-Unknown", "\n<root>\n<! \n", XML_ERROR_PARSING_UNKNOWN, 3); in main()
2618 …tester.TestParseError("ErrorLine-Element", "\n<root>\n<unclosed \n", XML_ERROR_PARSING_ELEMENT, 3); in main()
2619 …tester.TestParseError("ErrorLine-Attribute", "\n<root>\n<unclosed \n att\n", XML_ERROR_PARSING_ATT… in main()
2620 …tester.TestParseError("ErrorLine-ElementClose", "\n<root>\n<unclosed \n/unexpected", XML_ERROR_PAR… in main()
2623 "LineNumbers-String", in main()
2630 " cdata test ]]><!-- comment -->\n" // 6 Comment in main()
2636 "LineNumbers-CRLF", in main()
2652 "LineNumbers-File", in main()
2669 // ----------- Performance tracking -------------- in main()
2718 const double duration = 1000.0 * (double)(end - start) / ((double)freq * (double)COUNT); in main()
2720 const double duration = (double)(cend - cstart) / (double)COUNT; in main()
2722 printf("\nParsing dream.xml (%s): %.3f milli-seconds\n", note, duration); in main()