31 #include <boost/noncopyable.hpp> 93 typedef std::map<UString, const XMLNode *, UString::iless>
ChildMap;
106 XMLNode(_xmlNode &node,
bool makeLower =
false,
XMLNode *parent = 0);
109 void load(_xmlNode &node,
bool makeLower);
120 #endif // COMMON_XML_H
Generic interface for a readable data stream.
A class holding an UTF-8 string.
Class to parse a ReadStream into a simple XML tree.
const UString & getName() const
const XMLNode * getParent() const
Return the parent node, or 0 if this is the root node.
const Children & getChildren() const
Return a list of children.
std::map< UString, UString > Properties
A simple scoped smart pointer template.
A list storing pointer to objects, with automatic deletion.
std::map< UString, const XMLNode *, UString::iless > ChildMap
static void destroy(T *x)
const Properties & getProperties() const
Return all the properties on this node.
A scoped plain pointer, allowing pointer-y access and normal deletion.
UString getProperty(const UString &name, const UString &def="") const
Return a certain property on this node.
const XMLNode * findChild(const UString &name) const
Find a child node by name.
void deinitXML()
Deinitialize the XML subsystem.
XMLParser(ReadStream &stream, bool makeLower=false, const UString &fileName="stream.xml")
Parse an XML file out of a stream.
const UString & getContent() const
const XMLNode & getRoot() const
Return the XML root node.
void initXML()
Initialize the XML subsystem.
XMLNode(_xmlNode &node, bool makeLower=false, XMLNode *parent=0)
void load(_xmlNode &node, bool makeLower)
ScopedPtr< XMLNode > _rootNode
PtrList< const XMLNode > Children