ScummVM API documentation
Ultima::Shared::XMLNode Class Reference

Public Types

typedef Common::Pair< Common::String, Common::StringKeyType
 
typedef Common::Array< KeyTypeKeyTypeList
 

Public Member Functions

 XMLNode (XMLTree *tree, XMLNode *parent=nullptr)
 
 XMLNode (const XMLNode &n)
 
XMLNodeoperator= (const XMLNode &n)
 
const Common::Stringreference (const Common::String &, bool &)
 
const XMLNodesubtree (const Common::String &) const
 
const Common::Stringid () const
 
const Common::Stringtext (void) const
 
bool nodeIsText () const
 
XMLNodegetParent () const
 
bool hasChildren () const
 
XMLNodefirstChild () const
 
const Common::StringMapattributes () 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 ()
 
XMLNodegetPrior () const
 
XMLNodegetNext () const
 

Static Public Member Functions

static XMLNodexmlParseDoc (XMLTree *tree, const Common::String &s)
 
static XMLNodexmlParse (XMLTree *tree, const Common::String &s, size_t &pos)
 

Member Function Documentation

◆ searchPairs()

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'

◆ freeDoc()

void Ultima::Shared::XMLNode::freeDoc ( )

Deletes the entire tree this node belongs to, including itself

◆ getPrior()

XMLNode* Ultima::Shared::XMLNode::getPrior ( ) const

Gets the prior sibling to this one

◆ getNext()

XMLNode* Ultima::Shared::XMLNode::getNext ( ) const

Gets the following sibling to this one


The documentation for this class was generated from the following file: