44 std::string path = file_name;
47 bool loadOkay = doc.LoadFile(path.c_str());
51 std::string(
"Failed to load file '") +
52 path + std::string(
"'") +
53 std::string(
"\nError was '") + std::string(doc.ErrorDesc()) +
54 std::string(
"'\nIf error was 'Error reading end tag' you have a \ 73 int type = node->Type();
74 std::string node_text(node->Value());
84 new_node->
tag = node_text;
93 if(std::string(node->Parent()->Value()) ==
"filename")
98 std::string(
"/resources/") + std::string(node->Value()), n);
107 std::string(
"/") + std::string(node->Value()), n);
117 new_node->
value = node_text;
127 pChild = node->FirstChild();
129 pChild = pChild->NextSibling())
std::string tag
The node value (if it not a tag node)
XmlParser(void)
Default constructor.
The main namespace for STDR GUI XML parser.
static void parse(std::string file_name, Node *n)
Private function that initiates the parsing of an xml file.
std::string value
The node children.
static void parseLow(TiXmlNode *node, Node *n)
Low-level recursive function for parsing the xml robot file.
ROSLIB_DECL std::string getPath(const std::string &package_name)
std::string extractDirname(std::string s)
Extracts the directory from an absolute path. It does the same functionality as libgen's dirname but ...
Implements the main functionalities of the stdr parser tree.
std::string file_origin
Row in the original file.
std::vector< Node * > elements
File it was into.
Provides a parser exception. Publicly inherits from std::runtime_error. Used in robot handler...