MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / Parse

Method Parse

Source/3rdParty/tinyxml2/tinyxml2.cpp:1466–1490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1464}
1465
1466XMLError XMLDocument::Parse(const char* p, size_t len) {
1467 DeleteChildren();
1468 InitDocument();
1469
1470 if (!p || !*p) {
1471 SetError(p, XML_ERROR_EMPTY_DOCUMENT, 0, 0);
1472 return _errorID;
1473 }
1474 if (len == (size_t)(-1)) {
1475 len = strlen(p);
1476 }
1477 _charBuffer = new char[len + 1];
1478 memcpy(_charBuffer, p, len);
1479 _charBuffer[len] = 0;
1480
1481 p = XMLUtil::SkipWhiteSpace(p);
1482 p = XMLUtil::ReadBOM(p, &_writeBOM);
1483 if (!p || !*p) {
1484 SetError(0, XML_ERROR_EMPTY_DOCUMENT, 0, 0);
1485 return _errorID;
1486 }
1487
1488 ParseDeep(_charBuffer, 0);
1489 return _errorID;
1490}
1491
1492void XMLDocument::Print(XMLPrinter* streamer) {
1493 XMLPrinter stdStreamer(stdout);

Callers 15

parseDragonBonesDataMethod · 0.45
parseDragonBonesDataMethod · 0.45
parseTextureAtlasDataMethod · 0.45
printHelpCustomFunction · 0.45
SetMethod · 0.45
parseIterFunction · 0.45
parseFlagsMethod · 0.45
GenIndexHtmlMethod · 0.45
GenJSBindingMethod · 0.45
lfsEndpointFunction · 0.45
safeLFSOptionsFunction · 0.45

Calls 2

strlenFunction · 0.85
memcpyFunction · 0.50

Tested by

no test coverage detected