Lines Matching full: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()
584 const char* str = "<doc attr0='1' attr1='2.0' attr2='foo' />"; 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()
620 const char* str = "<doc/>"; 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()
770 //doc.Print(); 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()
808 XMLDocument doc; in main() local
809 XMLElement* element = doc.NewElement("element"); in main()
810 doc.InsertFirstChild(element); in main()
978 XMLDocument doc; in main() local
979 doc.LoadFile("resources/out/printer.xml"); in main()
980 XMLTest("XMLPrinter Stream mode: load", XML_SUCCESS, doc.ErrorID(), true); in main()
982 const XMLDocument& cdoc = doc; in main()
1049 XMLDocument doc; in main() local
1050 doc.LoadFile("resources/out/printer_1.xml"); in main()
1051 XMLTest("XMLPrinter Stream mode: load", XML_SUCCESS, doc.ErrorID(), true); in main()
1053 const XMLDocument& cdoc = doc; in main()
1108 XMLDocument doc; in main() local
1109 doc.Parse( str ); in main()
1110 XMLTest( "CDATA symbolic puns round 1", false, doc.Error() ); in main()
1111 doc.Print(); in main()
1114 doc.FirstChildElement()->FirstChild()->Value(), in main()
1126 XMLDocument doc; in main() local
1127 doc.Parse( str ); in main()
1128 XMLTest( "CDATA symbolic puns round 2", false, doc.Error() ); in main()
1129 doc.Print(); in main()
1133 doc.FirstChildElement()->FirstChild()->Value(), in main()
1140 XMLDocument doc; in main() local
1141 XMLElement* parent = doc.NewElement( "Parent" ); in main()
1142 doc.InsertFirstChild( parent ); in main()
1144 XMLElement* childText0 = doc.NewElement( "childText0" ); in main()
1145 XMLElement* childText1 = doc.NewElement( "childText1" ); in main()
1166 XMLDocument doc; in main() local
1167 doc.Parse( passages ); in main()
1168 XMLTest( "Entity transformation parse round 1", false, doc.Error() ); in main()
1169 XMLElement* psg = doc.RootElement()->FirstChildElement(); in main()
1208 XMLDocument doc( false ); in main() local
1209 doc.Parse( passages ); in main()
1210 XMLTest( "Entity transformation parse round 2", false, doc.Error() ); in main()
1214 doc.FirstChildElement()->FirstChildElement()->Attribute( "context" ) ); in main()
1216 doc.FirstChildElement()->FirstChildElement()->FirstChild()->Value() ); in main()
1217 doc.Print(); in main()
1223 XMLDocument doc; in main() local
1224 doc.Parse( test ); in main()
1225 XMLTest( "dot in names", false, doc.Error() ); in main()
1226 XMLTest( "dot in names", "a.elem", doc.FirstChildElement()->Name() ); in main()
1227 XMLTest( "dot in names", "2.0", doc.FirstChildElement()->Attribute( "xmi.version" ) ); in main()
1233 XMLDocument doc; in main() local
1234 doc.Parse( test ); in main()
1235 XMLTest( "fin thickness", false, doc.Error() ); in main()
1237 XMLText* text = doc.FirstChildElement()->FirstChildElement()->FirstChild()->ToText(); in main()
1253 XMLDocument doc; in main() local
1254 doc.Parse( doctype ); in main()
1255 XMLTest( "PLAY SYSTEM parse", false, doc.Error() ); in main()
1256 doc.SaveFile( "resources/out/test7.xml" ); in main()
1257 XMLTest( "PLAY SYSTEM save", false, doc.Error() ); in main()
1258 doc.DeleteChild( doc.RootElement() ); in main()
1259 doc.LoadFile( "resources/out/test7.xml" ); in main()
1260 XMLTest( "PLAY SYSTEM load", false, doc.Error() ); in main()
1261 doc.Print(); in main()
1263 const XMLUnknown* decl = doc.FirstChild()->NextSibling()->ToUnknown(); in main()
1272 XMLDocument doc; in main() local
1273 doc.Parse( doctype ); in main()
1274 XMLTest( "Comment somewhat evil", false, doc.Error() ); in main()
1276 XMLComment* comment = doc.FirstChild()->ToComment(); in main()
1284 XMLDocument doc; in main() local
1285 doc.Parse( doctype ); in main()
1287 …XMLTest( "Parsing repeated attributes.", XML_ERROR_PARSING_ATTRIBUTE, doc.ErrorID() ); // is an e… in main()
1288 doc.PrintError(); in main()
1295 XMLDocument doc; in main() local
1296 doc.Parse( doctype ); in main()
1297 XMLTest( "Embedded null throws error.", true, doc.Error() ); in main()
1303 XMLDocument doc; in main() local
1304 doc.Parse( str ); in main()
1305 XMLTest( "Empty document error", XML_ERROR_EMPTY_DOCUMENT, doc.ErrorID() ); in main()
1308 const char* errorStr = doc.ErrorStr(); in main()
1317 XMLDocument doc; in main() local
1318 doc.Parse( str ); in main()
1319 XMLTest( "All whitespaces document error", XML_ERROR_EMPTY_DOCUMENT, doc.ErrorID() ); in main()
1324 XMLDocument doc; in main() local
1325 doc.Parse( "<test></test>" ); in main()
1326 XMLTest( "Hex values", false, doc.Error() ); in main()
1328 XMLTest( "Low entities.", result, doc.FirstChildElement()->GetText() ); in main()
1329 doc.Print(); in main()
1334 XMLDocument doc; in main() local
1335 doc.Parse( "<foo attribute=bar\" />" ); in main()
1336 XMLTest( "Throw error with bad end quotes.", true, doc.Error() ); in main()
1395 XMLDocument doc; in main() local
1396 doc.Parse( (const char*)buf); in main()
1397 XMLTest( "Broken CDATA", true, doc.Error() ); in main()
1419 XMLDocument doc; in main() local
1420 doc.Parse( pub ); in main()
1421 XMLTest( "Trailing DOCTYPE", false, doc.Error() ); in main()
1424 for( const XMLNode* node=doc.FirstChild(); node; node=node->NextSibling() ) { in main()
1433 const XMLNode* b=doc.FirstChild(); in main()
1453 XMLDocument doc; in main() local
1454 doc.Parse(xml); in main()
1455 XMLTest( "Parse before deep cloning root element", false, doc.Error() ); in main()
1457 doc.Print(&printer1); in main()
1458 XMLNode* root = doc.RootElement()->DeepClone(&doc2); in main()
1480 XMLDocument doc; in main() local
1481 doc.Parse(xml); in main()
1482 XMLTest( "Parse before deep cloning sub element", false, doc.Error() ); in main()
1484 const XMLElement* subElement = doc.FirstChildElement("root")->FirstChildElement("child2"); in main()
1511 XMLDocument doc; in main() local
1512 doc.Parse(xml); in main()
1513 XMLTest( "Parse before deep cloning document", false, doc.Error() ); in main()
1514 doc.Print(&printer1); in main()
1516 doc.DeepCopy(&doc2); in main()
1527 XMLDocument doc; in main() local
1528 if(XML_SUCCESS != doc.LoadFile( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" )) in main()
1530 doc.PrintError(); in main()
1532 XMLTest( "Error in snprinf handling.", true, doc.Error() ); in main()
1538 XMLDocument doc; in main() local
1539 doc.Parse( xml ); in main()
1540 XMLTest( "Parse for attribute ordering", false, doc.Error() ); in main()
1541 XMLElement* ele = doc.FirstChildElement(); in main()
1588 …static const char* xml = "<doc><element attribute='attribute'/><element attribute='attribute'/></d… in main()
1589 XMLDocument doc; in main() local
1590 doc.Parse( xml ); in main()
1591 XMLTest( "Parse two elements with attribute", false, doc.Error() ); in main()
1592 XMLElement* ele0 = doc.FirstChildElement()->FirstChildElement(); in main()
1602 XMLDocument doc; in main() local
1603 doc.Parse( xml ); in main()
1604 XMLTest( "Handle, parse element with attribute and nested element", false, doc.Error() ); in main()
1607 XMLElement* ele = XMLHandle( doc ).FirstChildElement( "element" ).FirstChild().ToElement(); in main()
1613 XMLHandle docH( doc ); in main()
1619 …const XMLElement* ele = XMLConstHandle( doc ).FirstChildElement( "element" ).FirstChild().ToElemen… in main()
1625 XMLConstHandle docH( doc ); in main()
1632 XMLDocument doc; in main() local
1633 doc.InsertEndChild( doc.NewDeclaration() ); in main()
1634 doc.SetBOM( true ); in main()
1637 doc.Print( &printer ); in main()
1645 XMLDocument doc; in main() local
1646 doc.Parse( xml ); in main()
1647 XMLTest( "Ill formed XML", true, doc.Error() ); in main()
1654 XMLDocument doc; in main() local
1655 doc.Parse(xml); in main()
1657 const XMLElement* pointElement = doc.RootElement(); in main()
1682 XMLDocument doc; in main() local
1683 doc.Parse( xml ); in main()
1684 const XMLNode* PlaylistNode = doc.RootElement(); in main()
1700 XMLDocument doc; in main() local
1701 doc.Parse( xml ); in main()
1702 XMLElement* ElementPlaylist = doc.FirstChildElement("playlist"); in main()
1717 XMLDocument doc; in main() local
1718 doc.Parse( xml ); in main()
1719 XMLTest( "Parse points", false, doc.Error() ); in main()
1721 const XMLElement* pointElement = doc.RootElement(); in main()
1761 XMLDocument doc; in main() local
1762 doc.Parse( xml ); in main()
1763 XMLTest( "Non-alpha element lead letter parses.", false, doc.Error() ); in main()
1768 XMLDocument doc; in main() local
1769 doc.Parse( xml ); in main()
1770 XMLTest("Non-alpha attribute lead character parses.", false, doc.Error()); in main()
1775 XMLDocument doc; in main() local
1776 doc.Parse( xml ); in main()
1777 XMLTest("Element names with lead digit fail to parse.", true, doc.Error()); in main()
1782 XMLDocument doc; in main() local
1783 doc.Parse( xml, 10 ); in main()
1784 XMLTest( "Set length of incoming data", false, doc.Error() ); in main()
1788 XMLDocument doc; in main() local
1789 XMLTest( "Document is initially empty", true, doc.NoChildren() ); in main()
1790 doc.Clear(); in main()
1791 XMLTest( "Empty is empty after Clear()", true, doc.NoChildren() ); in main()
1792 doc.LoadFile( "resources/dream.xml" ); in main()
1793 XMLTest( "Load dream.xml", false, doc.Error() ); in main()
1794 XMLTest( "Document has something to Clear()", false, doc.NoChildren() ); in main()
1795 doc.Clear(); in main()
1796 XMLTest( "Document Clear()'s", true, doc.NoChildren() ); in main()
1800 XMLDocument doc; in main() local
1801 XMLTest( "No error initially", false, doc.Error() ); in main()
1802 XMLError error = doc.Parse( "This is not XML" ); in main()
1803 XMLTest( "Error after invalid XML", true, doc.Error() ); in main()
1804 XMLTest( "Error after invalid XML", error, doc.ErrorID() ); in main()
1805 doc.Clear(); in main()
1806 XMLTest( "No error after Clear()", false, doc.Error() ); in main()
1816 XMLDocument doc( true, COLLAPSE_WHITESPACE ); in main() local
1817 doc.Parse( xml ); in main()
1818 XMLTest( "Parse with whitespace collapsing and &apos", false, doc.Error() ); in main()
1820 const XMLElement* element = doc.FirstChildElement(); in main()
1844 XMLDocument doc( true, COLLAPSE_WHITESPACE ); in main() local
1845 doc.Parse( xml ); in main()
1846 XMLTest( "Parse with all whitespaces", false, doc.Error() ); in main()
1847 XMLTest( "Whitespace all space", true, 0 == doc.FirstChildElement()->FirstChild() ); in main()
1853 XMLDocument doc; in main() local
1854 doc.Parse( xml ); in main()
1855 XMLTest( "Parse with self-closed element", false, doc.Error() ); in main()
1856 …XMLElement* ele = doc.NewElement( "unused" ); // This will get cleaned up with the 'doc' going ou… in main()
1863 XMLDocument doc; in main() local
1864 doc.Parse( xml ); in main()
1865 XMLTest( "Parse for printing of sub-element", false, doc.Error() ); in main()
1866 XMLElement* ele = doc.FirstChildElement( "parent")->FirstChildElement( "child"); in main()
1876 XMLDocument doc; in main() local
1877 XMLError error = doc.LoadFile( "resources/empty.xml" ); in main()
1879 …XMLTest( "Loading an empty file and ErrorName as string", "XML_ERROR_EMPTY_DOCUMENT", doc.ErrorNam… in main()
1880 doc.PrintError(); in main()
1887 XMLDocument doc; in main() local
1888 XMLTest( "BOM preservation (parse)", XML_SUCCESS, doc.Parse( xml_bom_preservation ), false ); in main()
1890 doc.Print( &printer ); in main()
1893 doc.SaveFile( "resources/out/bomtest.xml" ); in main()
1894 XMLTest( "Save bomtest.xml", false, doc.Error() ); in main()
1897 XMLDocument doc; in main() local
1898 doc.LoadFile( "resources/out/bomtest.xml" ); in main()
1899 XMLTest( "Load bomtest.xml", false, doc.Error() ); in main()
1900 XMLTest( "BOM preservation (load)", true, doc.HasBOM(), false ); in main()
1903 doc.Print( &printer ); in main()
1945 XMLDocument doc; in main() local
1946 doc.Parse(xml); in main()
1947 XMLTest( "Insertion with removal parse round 1", false, doc.Error() ); in main()
1948 XMLElement* subtree = doc.RootElement()->FirstChildElement("one")->FirstChildElement("subtree"); in main()
1949 XMLElement* two = doc.RootElement()->FirstChildElement("two"); in main()
1952 bool acceptResult = doc.Accept(&printer1); in main()
1956 doc.Parse(xml); in main()
1957 XMLTest( "Insertion with removal parse round 2", false, doc.Error() ); in main()
1958 subtree = doc.RootElement()->FirstChildElement("one")->FirstChildElement("subtree"); in main()
1959 two = doc.RootElement()->FirstChildElement("two"); in main()
1960 doc.RootElement()->InsertAfterChild(two, subtree); in main()
1962 acceptResult = doc.Accept(&printer2); in main()
1966 doc.Parse(xml); in main()
1967 XMLTest( "Insertion with removal parse round 3", false, doc.Error() ); in main()
1968 XMLNode* one = doc.RootElement()->FirstChildElement("one"); in main()
1970 doc.RootElement()->InsertAfterChild(one, subtree); in main()
1972 acceptResult = doc.Accept(&printer3); in main()
1976 doc.Parse(xml); in main()
1977 XMLTest( "Insertion with removal parse round 4", false, doc.Error() ); in main()
1978 subtree = doc.RootElement()->FirstChildElement("one")->FirstChildElement("subtree"); in main()
1979 two = doc.RootElement()->FirstChildElement("two"); in main()
1980 …XMLTest("<two> is the last child at root level", true, two == doc.RootElement()->LastChildElement(… in main()
1981 doc.RootElement()->InsertEndChild(subtree); in main()
1983 acceptResult = doc.Accept(&printer4); in main()
1992 XMLDocument doc; in main() local
1993 doc.Parse(xml); in main()
1994 XMLTest( "Parse svg with text", false, doc.Error() ); in main()
1995 doc.Print(); in main()
2001 XMLDocument doc; in main() local
2002 doc.Parse(xml); in main()
2003 XMLTest( "Parse root-sample-field0", true, doc.Error() ); in main()
2004 doc.PrintError(); in main()
2013 XMLDocument doc; in main() local
2014 doc.Parse( xml ); in main()
2015 XMLTest( "Parse self-closed empty element", false, doc.Error() ); in main()
2016 doc.FirstChildElement()->SetAttribute( "attrA-f64", 123456789.123456789 ); in main()
2017 doc.FirstChildElement()->SetAttribute( "attrB-f64", 1.001e9 ); in main()
2018 doc.FirstChildElement()->SetAttribute( "attrC-f64", 1.0e9 ); in main()
2019 doc.FirstChildElement()->SetAttribute( "attrC-f64", 1.0e20 ); in main()
2020 doc.FirstChildElement()->SetAttribute( "attrD-f64", 1.0e-10 ); in main()
2021 doc.FirstChildElement()->SetAttribute( "attrD-f64", 0.123456789 ); in main()
2023 doc.FirstChildElement()->SetAttribute( "attrA-f32", 123456789.123456789f ); in main()
2024 doc.FirstChildElement()->SetAttribute( "attrB-f32", 1.001e9f ); in main()
2025 doc.FirstChildElement()->SetAttribute( "attrC-f32", 1.0e9f ); in main()
2026 doc.FirstChildElement()->SetAttribute( "attrC-f32", 1.0e20f ); in main()
2027 doc.FirstChildElement()->SetAttribute( "attrD-f32", 1.0e-10f ); in main()
2028 doc.FirstChildElement()->SetAttribute( "attrD-f32", 0.123456789f ); in main()
2030 doc.Print(); in main()
2034 doc.Print( &printer ); in main()
2050 XMLDocument doc; in main() local
2051 doc.Parse(xmlText); in main()
2052 XMLTest( "Parse hex no closing tag round 1", true, doc.Error() ); in main()
2055 XMLDocument doc; in main() local
2056 doc.Parse(xmlText); in main()
2057 XMLTest( "Parse hex no closing tag round 2", true, doc.Error() ); in main()
2058 doc.Clear(); in main()
2064 tinyxml2::XMLDocument doc; in main() local
2065 tinyxml2::XMLElement *pRoot = doc.NewElement("Root"); in main()
2066 doc.DeleteNode(pRoot); in main()
2070 XMLDocument doc; in main() local
2071 XMLElement* root = doc.NewElement( "Root" ); in main()
2072 XMLTest( "Node document before insertion", true, &doc == root->GetDocument() ); in main()
2073 doc.InsertEndChild( root ); in main()
2074 XMLTest( "Node document after insertion", true, &doc == root->GetDocument() ); in main()
2079 XMLDocument doc; in main() local
2080 XMLElement* unlinkedRoot = doc.NewElement( "Root" ); in main()
2081 XMLElement* linkedRoot = doc.NewElement( "Root" ); in main()
2082 doc.InsertFirstChild( linkedRoot ); in main()
2095 XMLDocument doc; in main() local
2096 doc.Parse( xml ); in main()
2097 XMLTest( "Parse hex with closing tag", false, doc.Error() ); in main()
2100 doc.Print( &printer ); in main()
2105 XMLDocument doc; in main() local
2106 XMLElement* newElement = doc.NewElement( "printme" ); in main()
2111 doc.DeleteNode( newElement ); in main()
2115 XMLDocument doc; in main() local
2116 XMLTest( "Issue 302. Should be no error initially", "XML_SUCCESS", doc.ErrorName() ); in main()
2117 doc.SaveFile( "./no/such/path/pretty.xml" ); in main()
2118 XMLTest( "Issue 302. Fail to save", "XML_ERROR_FILE_COULD_NOT_BE_OPENED", doc.ErrorName() ); in main()
2119 doc.SaveFile( "./resources/out/compact.xml", true ); in main()
2120 XMLTest( "Issue 302. Subsequent success in saving", "XML_SUCCESS", doc.ErrorName() ); in main()
2126 XMLDocument doc; in main() local
2127 XMLTest( "Should be no error initially", false, doc.Error() ); in main()
2128 doc.LoadFile( "resources/no-such-file.xml" ); in main()
2129 XMLTest( "No such file - should fail", true, doc.Error() ); in main()
2131 doc.LoadFile( "resources/dream.xml" ); in main()
2132 XMLTest( "Error should be cleared", false, doc.Error() ); in main()
2150 XMLDocument doc; in main() local
2151 doc.Parse(xml0); in main()
2152 XMLTest("Test that the code changes do not affect normal parsing", false, doc.Error() ); in main()
2153 doc.Parse(xml1); in main()
2154 XMLTest("Test that the second declaration is allowed", false, doc.Error() ); in main()
2155 doc.Parse(xml2); in main()
2156 …eclaration after self-closed child is not allowed", XML_ERROR_PARSING_DECLARATION, doc.ErrorID() ); in main()
2157 doc.Parse(xml3); in main()
2158 …est that declaration after a child is not allowed", XML_ERROR_PARSING_DECLARATION, doc.ErrorID() ); in main()
2159 doc.Parse(xml4); in main()
2160 …st that declaration inside a child is not allowed", XML_ERROR_PARSING_DECLARATION, doc.ErrorID() ); in main()
2170 XMLDocument* doc = new XMLDocument(); in main() local
2171 XMLTest( "XMLDocument::Value() returns null?", NULL, doc->Value() ); in main()
2172 doc->Parse( validXml ); in main()
2173 XMLTest( "Parse to test XMLDocument::Value()", false, doc->Error()); in main()
2174 XMLTest( "XMLDocument::Value() returns null?", NULL, doc->Value() ); in main()
2175 delete doc; in main()
2179 XMLDocument doc; in main() local
2196 XMLDocument doc(false); in main() local
2197 doc.Parse(html); in main()
2200 doc.Print(&printer); in main()
2225 XMLDocument doc; in main() local
2226 doc.NewElement("LEAK 1"); in main()
2229 XMLDocument doc; in main() local
2230 XMLElement* ele = doc.NewElement("LEAK 2"); in main()
2231 doc.DeleteNode(ele); in main()
2244 XMLDocument doc; in main() local
2245 doc.LoadFile(TESTS[i]); in main()
2246 XMLTest("Stack overflow prevented.", XML_ELEMENT_DEPTH_EXCEEDED, doc.ErrorID()); in main()
2255 XMLDocument doc; in main() local
2256 doc.LoadFile(TESTS[i]); in main()
2279 XMLDocument doc; in main() local
2280 XMLError err = doc.Parse(xml); in main()
2283 XMLElement* playlist = doc.FirstChildElement("playlist"); in main()
2332 XMLDocument doc; in main() local
2333 const XMLError parseError = doc.Parse(docStr); in main()
2335 XMLTest(testString, parseError, doc.ErrorID()); in main()
2336 XMLTest(testString, true, doc.Error()); in main()
2338 XMLTest(testString, expectedLine, doc.ErrorLineNum()); in main()
2343 XMLDocument doc; in main() local
2344 doc.Parse(docStr); in main()
2345 XMLTest(testString, false, doc.Error()); in main()
2346 TestDocLines(testString, doc, expectedLines); in main()
2351 XMLDocument doc; in main() local
2352 doc.LoadFile(file_name); in main()
2353 XMLTest(testString, false, doc.Error()); in main()
2354 TestDocLines(testString, doc, expectedLines); in main()
2367 bool VisitEnter(const XMLDocument& doc) in main()
2369 Push('D', doc.GetLineNum()); in main()
2400 void TestDocLines(const char *testString, XMLDocument &doc, const char *expectedLines) in main()
2403 const bool acceptResult = doc.Accept(this); in main()
2425 "<?xml version=\"1.0\"?>\n" // 1 Doc, DecL in main()
2438 "\r\n" // 1 Doc (arguably should be line 2) in main()
2459 XMLDocument doc; in main() local
2460 doc.Parse(xml); in main()
2461 XMLTest("Test mismatched elements.", true, doc.Error()); in main()
2462 XMLTest("Test mismatched elements.", XML_ERROR_MISMATCHED_ELEMENT, doc.ErrorID()); in main()
2465 printf("%s\n", doc.ErrorStr()); in main()
2466 doc.PrintError(); in main()
2497 XMLDocument doc; in main() local
2498 doc.Parse(mem); in main()
2499 parseDreamXmlFailed = parseDreamXmlFailed || doc.Error(); in main()