Public Types | |
typedef Common::Pair< Common::String, Common::String > | KeyType |
typedef Common::Array< KeyType > | KeyTypeList |
Public Member Functions | |
XMLNode (XMLTree *tree, XMLNode *parent=nullptr) | |
XMLNode (const XMLNode &n) | |
XMLNode & | operator= (const XMLNode &n) |
const Common::String & | reference (const Common::String &, bool &) |
const XMLNode * | subtree (const Common::String &) const |
const Common::String & | id () const |
const Common::String & | text (void) const |
bool | nodeIsText () const |
XMLNode * | getParent () const |
bool | hasChildren () const |
XMLNode * | firstChild () const |
const Common::StringMap & | attributes () const |
bool | hasProperty (const Common::String &attrName) const |
Common::String | getProperty (const Common::String &attrName) const |
int | getPropertyInt (const Common::String &attrName) const |
bool | getPropertyBool (const Common::String &attrName) const |
Common::String | operator[] (const Common::String &attrName) const |
const Common::Array< XMLNode * > & | children () const |
bool | searchPairs (KeyTypeList &ktl, const Common::String &basekey, const Common::String currkey, const unsigned int pos) |
void | selectPairs (KeyTypeList &ktl, const Common::String currkey) |
Common::String | dump (int depth=0) |
void | xmlAssign (const Common::String &key, const Common::String &value) |
void | listKeys (const Common::String &, Common::Array< Common::String > &, bool longformat=true) const |
void | freeDoc () |
XMLNode * | getPrior () const |
XMLNode * | getNext () const |
Static Public Member Functions | |
static XMLNode * | xmlParseDoc (XMLTree *tree, const Common::String &s) |
static XMLNode * | xmlParse (XMLTree *tree, const Common::String &s, size_t &pos) |
bool Ultima::Shared::XMLNode::searchPairs | ( | KeyTypeList & | ktl, |
const Common::String & | basekey, | ||
const Common::String | currkey, | ||
const unsigned int | pos | ||
) |
Returns a list of key->value pairs that are found under the provided 'basekey'. Ignores comments (and doesn't return them. Returns true if search is 'finished'
void Ultima::Shared::XMLNode::freeDoc | ( | ) |
Deletes the entire tree this node belongs to, including itself
XMLNode* Ultima::Shared::XMLNode::getPrior | ( | ) | const |
Gets the prior sibling to this one
XMLNode* Ultima::Shared::XMLNode::getNext | ( | ) | const |
Gets the following sibling to this one