Lines Matching refs:doc

117 	XMLDocument doc;  in example_1()  local
118 doc.LoadFile( "resources/dream.xml" ); in example_1()
120 return doc.ErrorID(); in example_1()
136 XMLDocument doc; in example_2() local
137 doc.Parse( xml ); in example_2()
139 return doc.ErrorID(); in example_2()
161 XMLDocument doc; in example_3() local
162 doc.Parse( xml ); in example_3()
164 XMLElement* titleElement = doc.FirstChildElement( "PLAY" )->FirstChildElement( "TITLE" ); in example_3()
172 return doc.ErrorID(); in example_3()
249 XMLDocument doc; in example_4() local
250 doc.Parse( xml ); in example_4()
255 …XMLElement* attributeApproachElement = doc.FirstChildElement()->FirstChildElement( "attributeAppro… in example_4()
258 XMLElement* textApproachElement = doc.FirstChildElement()->FirstChildElement( "textApproach" ); in example_4()
263 return !doc.Error() && ( v0 == v1 ); in example_4()
317 XMLDocument* doc = new XMLDocument(); in main() local
319 doc->LoadFile( argv[1] ); in main()
321 int errorID = doc->ErrorID(); in main()
322 delete doc; doc = 0; in main()
374 XMLDocument doc; in main() local
375 doc.Parse( test[i] ); in main()
376 XMLTest( "Element test", false, doc.Error() ); in main()
377 doc.Print(); in main()
389 XMLDocument doc; in main() local
390 doc.Parse( test ); in main()
391 XMLTest( "Hello world declaration", false, doc.Error() ); in main()
392 doc.Print(); in main()
399 XMLDocument doc; in main() local
400 XMLElement* element1 = doc.NewElement("Element1"); in main()
401 XMLElement* element2 = doc.NewElement("Element2"); in main()
402 doc.InsertEndChild(element1); in main()
403 doc.InsertEndChild(element2); in main()
404 doc.InsertAfterChild(element2, element2); in main()
405 doc.InsertAfterChild(element2, element2); in main()
409 XMLDocument doc; in main() local
410 XMLElement* element1 = doc.NewElement("Element1"); in main()
411 XMLElement* element2 = doc.NewElement("Element2"); in main()
412 doc.InsertEndChild(element1); in main()
413 doc.InsertEndChild(element2); in main()
417 doc.InsertAfterChild(element1, element1); in main()
418 doc.InsertAfterChild(element1, element1); in main()
419 doc.InsertAfterChild(element2, element2); in main()
420 doc.InsertAfterChild(element2, element2); in main()
425 XMLDocument doc; in main() local
426 doc.Parse( test ); in main()
427 XMLTest( "Element text before", false, doc.Error() ); in main()
428 XMLElement* root = doc.FirstChildElement(); in main()
429 XMLElement* newElement = doc.NewElement( "Subelement" ); in main()
431 doc.Print(); in main()
434 XMLDocument* doc = new XMLDocument(); in main() local
436 doc->Parse( test ); in main()
437 XMLTest( "Element with sub element", false, doc->Error() ); in main()
438 delete doc; in main()
442 XMLDocument doc; in main() local
444 XMLNode* first = doc.NewElement( "firstElement" ); in main()
446 XMLNode* firstAfterInsertion = doc.InsertFirstChild( first ); in main()
449 XMLNode* last = doc.NewElement( "lastElement" ); in main()
451 XMLNode* lastAfterInsertion = doc.InsertEndChild( last ); in main()
454 XMLNode* middle = doc.NewElement( "middleElement" ); in main()
456 XMLNode* middleAfterInsertion = doc.InsertAfterChild( first, middle ); in main()
469 XMLDocument* doc = new XMLDocument(); in main() local
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()
481 XMLNode* comment = element->InsertFirstChild( doc->NewComment( "comment" ) ); 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()
497 doc->DeleteNode( comment ); 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()
528 delete doc; in main()
535 XMLDocument doc; in main() local
536 doc.LoadFile( "resources/dream.xml" ); in main()
537 XMLTest( "Load dream.xml", false, doc.Error() ); in main()
539 doc.SaveFile( "resources/out/dreamout.xml" ); in main()
540 XMLTest( "Save dreamout.xml", false, doc.Error() ); in main()
541 doc.PrintError(); 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()
574 XMLDocument doc; in main() local
575 doc.Parse( error ); in main()
576 XMLTest( "Bad XML", XML_ERROR_PARSING_ATTRIBUTE, doc.ErrorID() ); in main()
577 const char* errorStr = doc.ErrorStr(); in main()
586 XMLDocument doc; in main() local
587 doc.Parse( str ); in main()
588 XMLTest( "Top level attributes", false, doc.Error() ); in main()
590 XMLElement* ele = doc.FirstChildElement(); in main()
622 XMLDocument doc; in main() local
623 doc.Parse( str ); in main()
624 XMLTest( "Empty top element", false, doc.Error() ); in main()
626 XMLElement* ele = doc.FirstChildElement(); in main()
665 XMLDocument doc; in main() local
666 doc.LoadFile( "resources/utf8test.xml" ); in main()
667 XMLTest( "Load utf8test.xml", false, doc.Error() ); in main()
670 XMLElement* element = doc.FirstChildElement( "document" )->FirstChildElement( "Russian" ); in main()
682 …XMLText* text = doc.FirstChildElement( "document" )->FirstChildElement( (const char*) russianEleme… in main()
688 doc.SaveFile( "resources/out/utf8testout.xml" ); in main()
689 XMLTest( "UTF-8: Save testout.xml", false, doc.Error() ); in main()
730 XMLDocument doc; in main() local
731 doc.Parse( str ); in main()
732 XMLTest( "Double whitespace", false, doc.Error() ); in main()
733 const XMLElement* element = doc.RootElement(); in main()
738 doc.Parse( str ); in main()
739 XMLTest( "Bold text simulation", false, doc.Error() ); in main()
740 element = doc.RootElement(); in main()
749 XMLDocument doc; in main() local
750 doc.Parse( str ); in main()
751 XMLTest( "Empty closed element", false, doc.Error() ); in main()
752 XMLElement* element = doc.RootElement(); in main()
761 doc.Parse( str ); in main()
762 XMLTest( "Empty self-closed element", false, doc.Error() ); in main()
763 element = doc.RootElement(); in main()
773 doc.Parse( str ); in main()
774 XMLTest( "Text in nested element", false, doc.Error() ); in main()
775 element = doc.RootElement(); in main()
781 doc.Parse( str ); in main()
782 XMLTest( "Empty self-closed element round 2", false, doc.Error() ); in main()
783 element = doc.RootElement(); in main()
807 XMLDocument doc; in main() local
808 XMLElement* element = doc.NewElement("element"); in main()
809 doc.InsertFirstChild(element); in main()
953 XMLDocument doc; in main() local
954 doc.LoadFile("resources/out/printer.xml"); in main()
955 XMLTest("XMLPrinter Stream mode: load", XML_SUCCESS, doc.ErrorID(), true); in main()
957 const XMLDocument& cdoc = doc; in main()
984 XMLDocument doc; in main() local
985 doc.Parse( str ); in main()
986 XMLTest( "CDATA symbolic puns round 1", false, doc.Error() ); in main()
987 doc.Print(); in main()
990 doc.FirstChildElement()->FirstChild()->Value(), in main()
1002 XMLDocument doc; in main() local
1003 doc.Parse( str ); in main()
1004 XMLTest( "CDATA symbolic puns round 2", false, doc.Error() ); in main()
1005 doc.Print(); in main()
1009 doc.FirstChildElement()->FirstChild()->Value(), in main()
1016 XMLDocument doc; in main() local
1017 XMLElement* parent = doc.NewElement( "Parent" ); in main()
1018 doc.InsertFirstChild( parent ); in main()
1020 XMLElement* childText0 = doc.NewElement( "childText0" ); in main()
1021 XMLElement* childText1 = doc.NewElement( "childText1" ); in main()
1042 XMLDocument doc; in main() local
1043 doc.Parse( passages ); in main()
1044 XMLTest( "Entity transformation parse round 1", false, doc.Error() ); in main()
1045 XMLElement* psg = doc.RootElement()->FirstChildElement(); in main()
1084 XMLDocument doc( false ); in main() local
1085 doc.Parse( passages ); in main()
1086 XMLTest( "Entity transformation parse round 2", false, doc.Error() ); in main()
1090 doc.FirstChildElement()->FirstChildElement()->Attribute( "context" ) ); in main()
1092 doc.FirstChildElement()->FirstChildElement()->FirstChild()->Value() ); in main()
1093 doc.Print(); in main()
1099 XMLDocument doc; in main() local
1100 doc.Parse( test ); in main()
1101 XMLTest( "dot in names", false, doc.Error() ); in main()
1102 XMLTest( "dot in names", "a.elem", doc.FirstChildElement()->Name() ); in main()
1103 XMLTest( "dot in names", "2.0", doc.FirstChildElement()->Attribute( "xmi.version" ) ); in main()
1109 XMLDocument doc; in main() local
1110 doc.Parse( test ); in main()
1111 XMLTest( "fin thickness", false, doc.Error() ); in main()
1113 XMLText* text = doc.FirstChildElement()->FirstChildElement()->FirstChild()->ToText(); in main()
1129 XMLDocument doc; in main() local
1130 doc.Parse( doctype ); in main()
1131 XMLTest( "PLAY SYSTEM parse", false, doc.Error() ); in main()
1132 doc.SaveFile( "resources/out/test7.xml" ); in main()
1133 XMLTest( "PLAY SYSTEM save", false, doc.Error() ); in main()
1134 doc.DeleteChild( doc.RootElement() ); in main()
1135 doc.LoadFile( "resources/out/test7.xml" ); in main()
1136 XMLTest( "PLAY SYSTEM load", false, doc.Error() ); in main()
1137 doc.Print(); in main()
1139 const XMLUnknown* decl = doc.FirstChild()->NextSibling()->ToUnknown(); in main()
1148 XMLDocument doc; in main() local
1149 doc.Parse( doctype ); in main()
1150 XMLTest( "Comment somewhat evil", false, doc.Error() ); in main()
1152 XMLComment* comment = doc.FirstChild()->ToComment(); in main()
1160 XMLDocument doc; in main() local
1161 doc.Parse( doctype ); in main()
1163 …XMLTest( "Parsing repeated attributes.", XML_ERROR_PARSING_ATTRIBUTE, doc.ErrorID() ); // is an e… in main()
1164 doc.PrintError(); in main()
1171 XMLDocument doc; in main() local
1172 doc.Parse( doctype ); in main()
1173 XMLTest( "Embedded null throws error.", true, doc.Error() ); in main()
1179 XMLDocument doc; in main() local
1180 doc.Parse( str ); in main()
1181 XMLTest( "Empty document error", XML_ERROR_EMPTY_DOCUMENT, doc.ErrorID() ); in main()
1184 const char* errorStr = doc.ErrorStr(); in main()
1193 XMLDocument doc; in main() local
1194 doc.Parse( str ); in main()
1195 XMLTest( "All whitespaces document error", XML_ERROR_EMPTY_DOCUMENT, doc.ErrorID() ); in main()
1200 XMLDocument doc; in main() local
1201 doc.Parse( "<test>&#x0e;</test>" ); in main()
1202 XMLTest( "Hex values", false, doc.Error() ); in main()
1204 XMLTest( "Low entities.", result, doc.FirstChildElement()->GetText() ); in main()
1205 doc.Print(); in main()
1210 XMLDocument doc; in main() local
1211 doc.Parse( "<foo attribute=bar\" />" ); in main()
1212 XMLTest( "Throw error with bad end quotes.", true, doc.Error() ); in main()
1271 XMLDocument doc; in main() local
1272 doc.Parse( (const char*)buf); in main()
1273 XMLTest( "Broken CDATA", true, doc.Error() ); in main()
1295 XMLDocument doc; in main() local
1296 doc.Parse( pub ); in main()
1297 XMLTest( "Trailing DOCTYPE", false, doc.Error() ); in main()
1300 for( const XMLNode* node=doc.FirstChild(); node; node=node->NextSibling() ) { in main()
1309 const XMLNode* b=doc.FirstChild(); in main()
1329 XMLDocument doc; in main() local
1330 doc.Parse(xml); in main()
1331 XMLTest( "Parse before deep cloning root element", false, doc.Error() ); in main()
1333 doc.Print(&printer1); in main()
1334 XMLNode* root = doc.RootElement()->DeepClone(&doc2); in main()
1356 XMLDocument doc; in main() local
1357 doc.Parse(xml); in main()
1358 XMLTest( "Parse before deep cloning sub element", false, doc.Error() ); in main()
1360 const XMLElement* subElement = doc.FirstChildElement("root")->FirstChildElement("child2"); in main()
1387 XMLDocument doc; in main() local
1388 doc.Parse(xml); in main()
1389 XMLTest( "Parse before deep cloning document", false, doc.Error() ); in main()
1390 doc.Print(&printer1); in main()
1392 doc.DeepCopy(&doc2); in main()
1403 XMLDocument doc; in main() local
1404 if(XML_SUCCESS != doc.LoadFile( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" )) in main()
1406 doc.PrintError(); in main()
1408 XMLTest( "Error in snprinf handling.", true, doc.Error() ); in main()
1414 XMLDocument doc; in main() local
1415 doc.Parse( xml ); in main()
1416 XMLTest( "Parse for attribute ordering", false, doc.Error() ); in main()
1417 XMLElement* ele = doc.FirstChildElement(); in main()
1465 XMLDocument doc; in main() local
1466 doc.Parse( xml ); in main()
1467 XMLTest( "Parse two elements with attribute", false, doc.Error() ); in main()
1468 XMLElement* ele0 = doc.FirstChildElement()->FirstChildElement(); in main()
1478 XMLDocument doc; in main() local
1479 doc.Parse( xml ); in main()
1480 XMLTest( "Handle, parse element with attribute and nested element", false, doc.Error() ); in main()
1483 XMLElement* ele = XMLHandle( doc ).FirstChildElement( "element" ).FirstChild().ToElement(); in main()
1489 XMLHandle docH( doc ); in main()
1495 …const XMLElement* ele = XMLConstHandle( doc ).FirstChildElement( "element" ).FirstChild().ToElemen… in main()
1501 XMLConstHandle docH( doc ); in main()
1508 XMLDocument doc; in main() local
1509 doc.InsertEndChild( doc.NewDeclaration() ); in main()
1510 doc.SetBOM( true ); in main()
1513 doc.Print( &printer ); in main()
1521 XMLDocument doc; in main() local
1522 doc.Parse( xml ); in main()
1523 XMLTest( "Ill formed XML", true, doc.Error() ); in main()
1529 XMLDocument doc; in main() local
1530 doc.Parse( xml ); in main()
1531 XMLTest( "Parse points", false, doc.Error() ); in main()
1533 const XMLElement* pointElement = doc.RootElement(); in main()
1573 XMLDocument doc; in main() local
1574 doc.Parse( xml ); in main()
1575 XMLTest( "Non-alpha element lead letter parses.", false, doc.Error() ); in main()
1580 XMLDocument doc; in main() local
1581 doc.Parse( xml ); in main()
1582 XMLTest("Non-alpha attribute lead character parses.", false, doc.Error()); in main()
1587 XMLDocument doc; in main() local
1588 doc.Parse( xml ); in main()
1589 XMLTest("Element names with lead digit fail to parse.", true, doc.Error()); in main()
1594 XMLDocument doc; in main() local
1595 doc.Parse( xml, 10 ); in main()
1596 XMLTest( "Set length of incoming data", false, doc.Error() ); in main()
1600 XMLDocument doc; in main() local
1601 XMLTest( "Document is initially empty", true, doc.NoChildren() ); in main()
1602 doc.Clear(); in main()
1603 XMLTest( "Empty is empty after Clear()", true, doc.NoChildren() ); in main()
1604 doc.LoadFile( "resources/dream.xml" ); in main()
1605 XMLTest( "Load dream.xml", false, doc.Error() ); in main()
1606 XMLTest( "Document has something to Clear()", false, doc.NoChildren() ); in main()
1607 doc.Clear(); in main()
1608 XMLTest( "Document Clear()'s", true, doc.NoChildren() ); in main()
1612 XMLDocument doc; in main() local
1613 XMLTest( "No error initially", false, doc.Error() ); in main()
1614 XMLError error = doc.Parse( "This is not XML" ); in main()
1615 XMLTest( "Error after invalid XML", true, doc.Error() ); in main()
1616 XMLTest( "Error after invalid XML", error, doc.ErrorID() ); in main()
1617 doc.Clear(); in main()
1618 XMLTest( "No error after Clear()", false, doc.Error() ); in main()
1628 XMLDocument doc( true, COLLAPSE_WHITESPACE ); in main() local
1629 doc.Parse( xml ); in main()
1630 XMLTest( "Parse with whitespace collapsing and &apos", false, doc.Error() ); in main()
1632 const XMLElement* element = doc.FirstChildElement(); in main()
1656 XMLDocument doc( true, COLLAPSE_WHITESPACE ); in main() local
1657 doc.Parse( xml ); in main()
1658 XMLTest( "Parse with all whitespaces", false, doc.Error() ); in main()
1659 XMLTest( "Whitespace all space", true, 0 == doc.FirstChildElement()->FirstChild() ); in main()
1665 XMLDocument doc; in main() local
1666 doc.Parse( xml ); in main()
1667 XMLTest( "Parse with self-closed element", false, doc.Error() ); in main()
1668 …XMLElement* ele = doc.NewElement( "unused" ); // This will get cleaned up with the 'doc' going ou… in main()
1675 XMLDocument doc; in main() local
1676 doc.Parse( xml ); in main()
1677 XMLTest( "Parse for printing of sub-element", false, doc.Error() ); in main()
1678 XMLElement* ele = doc.FirstChildElement( "parent")->FirstChildElement( "child"); in main()
1688 XMLDocument doc; in main() local
1689 XMLError error = doc.LoadFile( "resources/empty.xml" ); in main()
1691 …XMLTest( "Loading an empty file and ErrorName as string", "XML_ERROR_EMPTY_DOCUMENT", doc.ErrorNam… in main()
1692 doc.PrintError(); in main()
1699 XMLDocument doc; in main() local
1700 XMLTest( "BOM preservation (parse)", XML_SUCCESS, doc.Parse( xml_bom_preservation ), false ); in main()
1702 doc.Print( &printer ); in main()
1705 doc.SaveFile( "resources/bomtest.xml" ); in main()
1706 XMLTest( "Save bomtest.xml", false, doc.Error() ); in main()
1709 XMLDocument doc; in main() local
1710 doc.LoadFile( "resources/bomtest.xml" ); in main()
1711 XMLTest( "Load bomtest.xml", false, doc.Error() ); in main()
1712 XMLTest( "BOM preservation (load)", true, doc.HasBOM(), false ); in main()
1715 doc.Print( &printer ); in main()
1757 XMLDocument doc; in main() local
1758 doc.Parse(xml); in main()
1759 XMLTest( "Insertion with removal parse round 1", false, doc.Error() ); in main()
1760 XMLElement* subtree = doc.RootElement()->FirstChildElement("one")->FirstChildElement("subtree"); in main()
1761 XMLElement* two = doc.RootElement()->FirstChildElement("two"); in main()
1764 bool acceptResult = doc.Accept(&printer1); in main()
1768 doc.Parse(xml); in main()
1769 XMLTest( "Insertion with removal parse round 2", false, doc.Error() ); in main()
1770 subtree = doc.RootElement()->FirstChildElement("one")->FirstChildElement("subtree"); in main()
1771 two = doc.RootElement()->FirstChildElement("two"); in main()
1772 doc.RootElement()->InsertAfterChild(two, subtree); in main()
1774 acceptResult = doc.Accept(&printer2); in main()
1778 doc.Parse(xml); in main()
1779 XMLTest( "Insertion with removal parse round 3", false, doc.Error() ); in main()
1780 XMLNode* one = doc.RootElement()->FirstChildElement("one"); in main()
1782 doc.RootElement()->InsertAfterChild(one, subtree); in main()
1784 acceptResult = doc.Accept(&printer3); in main()
1788 doc.Parse(xml); in main()
1789 XMLTest( "Insertion with removal parse round 4", false, doc.Error() ); in main()
1790 subtree = doc.RootElement()->FirstChildElement("one")->FirstChildElement("subtree"); in main()
1791 two = doc.RootElement()->FirstChildElement("two"); in main()
1792 …XMLTest("<two> is the last child at root level", true, two == doc.RootElement()->LastChildElement(… in main()
1793 doc.RootElement()->InsertEndChild(subtree); in main()
1795 acceptResult = doc.Accept(&printer4); in main()
1804 XMLDocument doc; in main() local
1805 doc.Parse(xml); in main()
1806 XMLTest( "Parse svg with text", false, doc.Error() ); in main()
1807 doc.Print(); in main()
1813 XMLDocument doc; in main() local
1814 doc.Parse(xml); in main()
1815 XMLTest( "Parse root-sample-field0", true, doc.Error() ); in main()
1816 doc.PrintError(); in main()
1825 XMLDocument doc; in main() local
1826 doc.Parse( xml ); in main()
1827 XMLTest( "Parse self-closed empty element", false, doc.Error() ); in main()
1828 doc.FirstChildElement()->SetAttribute( "attrA-f64", 123456789.123456789 ); in main()
1829 doc.FirstChildElement()->SetAttribute( "attrB-f64", 1.001e9 ); in main()
1830 doc.FirstChildElement()->SetAttribute( "attrC-f64", 1.0e9 ); in main()
1831 doc.FirstChildElement()->SetAttribute( "attrC-f64", 1.0e20 ); in main()
1832 doc.FirstChildElement()->SetAttribute( "attrD-f64", 1.0e-10 ); in main()
1833 doc.FirstChildElement()->SetAttribute( "attrD-f64", 0.123456789 ); in main()
1835 doc.FirstChildElement()->SetAttribute( "attrA-f32", 123456789.123456789f ); in main()
1836 doc.FirstChildElement()->SetAttribute( "attrB-f32", 1.001e9f ); in main()
1837 doc.FirstChildElement()->SetAttribute( "attrC-f32", 1.0e9f ); in main()
1838 doc.FirstChildElement()->SetAttribute( "attrC-f32", 1.0e20f ); in main()
1839 doc.FirstChildElement()->SetAttribute( "attrD-f32", 1.0e-10f ); in main()
1840 doc.FirstChildElement()->SetAttribute( "attrD-f32", 0.123456789f ); in main()
1842 doc.Print(); in main()
1862 XMLDocument doc; in main() local
1863 doc.Parse(xmlText); in main()
1864 XMLTest( "Parse hex no closing tag round 1", true, doc.Error() ); in main()
1867 XMLDocument doc; in main() local
1868 doc.Parse(xmlText); in main()
1869 XMLTest( "Parse hex no closing tag round 2", true, doc.Error() ); in main()
1870 doc.Clear(); in main()
1876 tinyxml2::XMLDocument doc; in main() local
1877 tinyxml2::XMLElement *pRoot = doc.NewElement("Root"); in main()
1878 doc.DeleteNode(pRoot); in main()
1882 XMLDocument doc; in main() local
1883 XMLElement* root = doc.NewElement( "Root" ); in main()
1884 XMLTest( "Node document before insertion", true, &doc == root->GetDocument() ); in main()
1885 doc.InsertEndChild( root ); in main()
1886 XMLTest( "Node document after insertion", true, &doc == root->GetDocument() ); in main()
1891 XMLDocument doc; in main() local
1892 XMLElement* unlinkedRoot = doc.NewElement( "Root" ); in main()
1893 XMLElement* linkedRoot = doc.NewElement( "Root" ); in main()
1894 doc.InsertFirstChild( linkedRoot ); in main()
1907 XMLDocument doc; in main() local
1908 doc.Parse( xml ); in main()
1909 XMLTest( "Parse hex with closing tag", false, doc.Error() ); in main()
1912 doc.Print( &printer ); in main()
1917 XMLDocument doc; in main() local
1918 XMLElement* newElement = doc.NewElement( "printme" ); in main()
1923 doc.DeleteNode( newElement ); in main()
1927 XMLDocument doc; in main() local
1928 XMLTest( "Issue 302. Should be no error initially", "XML_SUCCESS", doc.ErrorName() ); in main()
1929 doc.SaveFile( "./no/such/path/pretty.xml" ); in main()
1930 XMLTest( "Issue 302. Fail to save", "XML_ERROR_FILE_COULD_NOT_BE_OPENED", doc.ErrorName() ); in main()
1931 doc.SaveFile( "./resources/out/compact.xml", true ); in main()
1932 XMLTest( "Issue 302. Subsequent success in saving", "XML_SUCCESS", doc.ErrorName() ); in main()
1938 XMLDocument doc; in main() local
1939 XMLTest( "Should be no error initially", false, doc.Error() ); in main()
1940 doc.LoadFile( "resources/no-such-file.xml" ); in main()
1941 XMLTest( "No such file - should fail", true, doc.Error() ); in main()
1943 doc.LoadFile( "resources/dream.xml" ); in main()
1944 XMLTest( "Error should be cleared", false, doc.Error() ); in main()
1962 XMLDocument doc; in main() local
1963 doc.Parse(xml0); in main()
1964 XMLTest("Test that the code changes do not affect normal parsing", false, doc.Error() ); in main()
1965 doc.Parse(xml1); in main()
1966 XMLTest("Test that the second declaration is allowed", false, doc.Error() ); in main()
1967 doc.Parse(xml2); in main()
1968 …eclaration after self-closed child is not allowed", XML_ERROR_PARSING_DECLARATION, doc.ErrorID() ); in main()
1969 doc.Parse(xml3); in main()
1970 …est that declaration after a child is not allowed", XML_ERROR_PARSING_DECLARATION, doc.ErrorID() ); in main()
1971 doc.Parse(xml4); in main()
1972 …st that declaration inside a child is not allowed", XML_ERROR_PARSING_DECLARATION, doc.ErrorID() ); in main()
1982 XMLDocument* doc = new XMLDocument(); in main() local
1983 XMLTest( "XMLDocument::Value() returns null?", NULL, doc->Value() ); in main()
1984 doc->Parse( validXml ); in main()
1985 XMLTest( "Parse to test XMLDocument::Value()", false, doc->Error()); in main()
1986 XMLTest( "XMLDocument::Value() returns null?", NULL, doc->Value() ); in main()
1987 delete doc; in main()
1991 XMLDocument doc; in main() local
2008 XMLDocument doc(false); in main() local
2009 doc.Parse(html); in main()
2012 doc.Print(&printer); in main()
2037 XMLDocument doc; in main() local
2038 doc.NewElement("LEAK 1"); in main()
2041 XMLDocument doc; in main() local
2042 XMLElement* ele = doc.NewElement("LEAK 2"); in main()
2043 doc.DeleteNode(ele); in main()
2056 XMLDocument doc; in main() local
2057 doc.LoadFile(TESTS[i]); in main()
2058 XMLTest("Stack overflow prevented.", XML_ELEMENT_DEPTH_EXCEEDED, doc.ErrorID()); in main()
2067 XMLDocument doc; in main() local
2068 doc.LoadFile(TESTS[i]); in main()
2091 XMLDocument doc; in main() local
2092 XMLError err = doc.Parse(xml); in main()
2095 XMLElement* playlist = doc.FirstChildElement("playlist"); in main()
2144 XMLDocument doc; in main() local
2145 const XMLError parseError = doc.Parse(docStr); in main()
2147 XMLTest(testString, parseError, doc.ErrorID()); in main()
2148 XMLTest(testString, true, doc.Error()); in main()
2150 XMLTest(testString, expectedLine, doc.ErrorLineNum()); in main()
2155 XMLDocument doc; in main() local
2156 doc.Parse(docStr); in main()
2157 XMLTest(testString, false, doc.Error()); in main()
2158 TestDocLines(testString, doc, expectedLines); in main()
2163 XMLDocument doc; in main() local
2164 doc.LoadFile(file_name); in main()
2165 XMLTest(testString, false, doc.Error()); in main()
2166 TestDocLines(testString, doc, expectedLines); in main()
2179 bool VisitEnter(const XMLDocument& doc) in main()
2181 Push('D', doc.GetLineNum()); in main()
2212 void TestDocLines(const char *testString, XMLDocument &doc, const char *expectedLines) in main()
2215 const bool acceptResult = doc.Accept(this); in main()
2271 XMLDocument doc; in main() local
2272 doc.Parse(xml); in main()
2273 XMLTest("Test mismatched elements.", true, doc.Error()); in main()
2274 XMLTest("Test mismatched elements.", XML_ERROR_MISMATCHED_ELEMENT, doc.ErrorID()); in main()
2277 printf("%s\n", doc.ErrorStr()); in main()
2278 doc.PrintError(); in main()
2309 XMLDocument doc; in main() local
2310 doc.Parse(mem); in main()
2311 parseDreamXmlFailed = parseDreamXmlFailed || doc.Error(); in main()