summaryrefslogtreecommitdiff
path: root/indra/llxml/llxmltree.cpp
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2024-05-20 11:14:29 -0700
committerBrad Linden <brad@lindenlab.com>2024-05-20 11:14:29 -0700
commit6af5db09faf5ea33a2d4c47b64e76f42edae178a (patch)
treed746c96bab1bfd44c6373926608e91c0f2fd9e49 /indra/llxml/llxmltree.cpp
parenteab232d3ed49bfb1f873e332ff57ec8c311c163b (diff)
parent6d6eabca44d08d5b97bfe3e941d2b9687c2246ea (diff)
Merge remote-tracking branch 'origin/DRTVWR-600-maint-A' into brad/merge-maint-a-to-dev
Diffstat (limited to 'indra/llxml/llxmltree.cpp')
-rw-r--r--indra/llxml/llxmltree.cpp45
1 files changed, 3 insertions, 42 deletions
diff --git a/indra/llxml/llxmltree.cpp b/indra/llxml/llxmltree.cpp
index 0c1615f486..a9c702f552 100644
--- a/indra/llxml/llxmltree.cpp
+++ b/indra/llxml/llxmltree.cpp
@@ -35,7 +35,6 @@
#include "v4math.h"
#include "llquaternion.h"
#include "lluuid.h"
-#include "lldir.h"
//////////////////////////////////////////////////////////////
// LLXmlTree
@@ -61,37 +60,20 @@ void LLXmlTree::cleanup()
mNodeNames.cleanup();
}
-bool LLXmlTree::parseFile(const std::string & filename, bool keep_contents)
-{
- delete mRoot;
- mRoot = NULL;
-
- std::string xml = gDirUtilp->getFileContents(filename);
- if (xml.empty())
- {
- LL_WARNS() << "LLXmlTree parse failed. No XML file: " << filename << LL_ENDL;
- return false;
- }
-
- bool success = parseString(xml, keep_contents);
- return success;
-}
-
-bool LLXmlTree::parseString(const std::string &xml, bool keep_contents)
+bool LLXmlTree::parseFile(const std::string &path, bool keep_contents)
{
delete mRoot;
mRoot = NULL;
LLXmlTreeParser parser(this);
- bool success = parser.parseString(xml, &mRoot, keep_contents);
- if (!success)
+ bool success = parser.parseFile( path, &mRoot, keep_contents );
+ if( !success )
{
S32 line_number = parser.getCurrentLineNumber();
const char* error = parser.getErrorString();
LL_WARNS() << "LLXmlTree parse failed. Line " << line_number << ": " << error << LL_ENDL;
}
-
return success;
}
@@ -554,27 +536,6 @@ bool LLXmlTreeParser::parseFile(const std::string &path, LLXmlTreeNode** root, b
return success;
}
-bool LLXmlTreeParser::parseString(const std::string& xml, LLXmlTreeNode** root, bool keep_contents)
-{
- llassert( !mRoot );
- llassert( !mCurrent );
-
- mKeepContents = keep_contents;
-
- bool success = LLXmlParser::parse(xml.data(), (int)xml.size(), true);
-
- *root = mRoot;
- mRoot = NULL;
-
- if (success)
- {
- llassert(!mCurrent);
- }
-
- mCurrent = NULL;
-
- return success;
-}
const std::string& LLXmlTreeParser::tabs()
{