ReactOS 0.4.16-dev-91-g764881a
|
in memory representation of an XML node More...
#include <xmlstorage.h>
Classes | |
struct | AttributeMap |
map of XML node attributes More... | |
struct | Children |
internal children node list More... | |
Public Types | |
enum | COPY_FLAGS { COPY_NOCHILDREN } |
Public Types inherited from XMLStorage::XS_String | |
typedef std::string | super |
Public Member Functions | |
XMLNode (const XS_String &name) | |
XMLNode (const XS_String &name, const std::string &leading) | |
XMLNode (const XMLNode &other) | |
XMLNode (const XMLNode &other, COPY_FLAGS copy_no_children) | |
virtual | ~XMLNode () |
void | clear () |
XMLNode & | operator= (const XMLNode &other) |
void | add_child (XMLNode *child) |
add a new child node | |
void | remove_children (const XS_String &name) |
remove all children named 'name' | |
void | put (const XS_String &attr_name, const XS_String &value) |
write access to an attribute | |
XS_String & | operator[] (const XS_String &attr_name) |
index operator write access to an attribute | |
template<typename T > | |
XS_String | get (const T &attr_name, LPCXSSTR def=XS_EMPTY_STR) const |
read only access to an attribute | |
void | erase (const XS_String &attr_name) |
remove the attribute 'attr_name' | |
XS_String | subvalue (const XS_String &child_name, const XS_String &attr_name, int n=0) const |
convenient value access in children node | |
XS_String & | subvalue (const XS_String &child_name, const XS_String &attr_name, int n=0) |
convenient storage of distinct values in children node | |
const Children & | get_children () const |
Children & | get_children () |
const AttributeMap & | get_attributes () const |
AttributeMap & | get_attributes () |
XS_String | get_content () const |
read element node content | |
XS_String | get_sub_content (const XPath &xpath) const |
read content of a subnode specified by an XPath expression | |
void | set_content (const XS_String &s, bool cdata=false) |
set element node content | |
bool | set_sub_content (const XPath &xpath, const XS_String &s, bool cdata=false) |
set content of a subnode specified by an XPath expression | |
bool | write (std::ostream &out, const XMLFormat &format, WRITE_MODE mode=FORMAT_SMART, int indent=0) const |
write node with children tree to output stream | |
int | count (const XPath &xpath) const |
count the nodes matching the given relative XPath expression | |
int | count (XPath::const_iterator from, const XPath::const_iterator &to) const |
count the nodes matching the given relative XPath expression | |
bool | filter (const XPath &xpath, XMLNode &target) const |
copy matching tree nodes using the given XPath filter expression | |
const XMLNode * | find_relative (const XPath &xpath) const |
XPath find function (const) | |
XMLNode * | find_relative (const XPath &xpath) |
XPath find function. | |
XMLNode * | get_first_child () const |
Public Member Functions inherited from XMLStorage::XS_String | |
XS_String () | |
XS_String (LPCXSSTR s) | |
XS_String (LPCXSSTR s, size_t l) | |
XS_String (const super &other) | |
XS_String (const XS_String &other) | |
void | assign (const XS_String &s) |
XS_String & | operator= (LPCXSSTR s) |
XS_String & | operator= (const super &s) |
void | assign (LPCXSSTR s) |
void | assign (LPCXSSTR s, size_t l) |
operator LPCXSSTR () const | |
XS_String & | printf (LPCXSSTR fmt,...) |
XS_String & | vprintf (LPCXSSTR fmt, va_list l) |
XS_String & | appendf (LPCXSSTR fmt,...) |
XS_String & | vappendf (LPCXSSTR fmt, va_list l) |
Protected Member Functions | |
XMLNode * | create_relative (const XPath &xpath) |
relative XPath create function | |
XMLNode * | filter (XPath::const_iterator from, const XPath::const_iterator &to) const |
create a new node tree using the given XPath filter expression | |
void | original_write_worker (std::ostream &out) const |
write node with children tree to output stream using original white space | |
void | plain_write_worker (std::ostream &out) const |
print node without any white space | |
void | pretty_write_worker (std::ostream &out, const XMLFormat &format, int indent) const |
pretty print node with children tree to output stream | |
void | smart_write_worker (std::ostream &out, const XMLFormat &format, int indent) const |
write node with children tree to output stream using smart formating | |
Protected Attributes | |
Children | _children |
AttributeMap | _attributes |
std::string | _leading |
std::string | _content |
std::string | _end_leading |
std::string | _trailing |
bool | _cdata_content |
Friends | |
struct | XMLPos |
struct | const_XMLPos |
struct | XMLReaderBase |
struct | XPathElement |
in memory representation of an XML node
Definition at line 854 of file xmlstorage.h.
Definition at line 984 of file xmlstorage.h.
Definition at line 990 of file xmlstorage.h.
Definition at line 997 of file xmlstorage.h.
|
inline |
Definition at line 1015 of file xmlstorage.h.
|
inlinevirtual |
Definition at line 1030 of file xmlstorage.h.
add a new child node
Definition at line 1067 of file xmlstorage.h.
Referenced by XMLStorage::XMLPos::add_down(), XMLStorage::XMLPos::create_node_content(), and subvalue().
|
inline |
Definition at line 1038 of file xmlstorage.h.
count the nodes matching the given relative XPath expression
Definition at line 1244 of file xmlstorage.h.
Referenced by XMLStorage::XMLPos::count().
int XMLStorage::XMLNode::count | ( | XPath::const_iterator | from, |
const XPath::const_iterator & | to | ||
) | const |
count the nodes matching the given relative XPath expression
Definition at line 301 of file xmlstorage.cpp.
relative XPath create function
Definition at line 279 of file xmlstorage.cpp.
Referenced by XMLStorage::XMLPos::create_relative(), and set_sub_content().
remove the attribute 'attr_name'
Definition at line 1106 of file xmlstorage.h.
Referenced by XMLStorage::XMLPos::erase(), and XMLStorage::XMLNode::Children::remove().
copy matching tree nodes using the given XPath filter expression
Definition at line 321 of file xmlstorage.cpp.
Referenced by XMLStorage::XMLPos::filter().
|
protected |
create a new node tree using the given XPath filter expression
Definition at line 338 of file xmlstorage.cpp.
XPath find function (const)
Definition at line 251 of file xmlstorage.cpp.
Referenced by get_sub_content().
|
inline |
read only access to an attribute
Definition at line 1095 of file xmlstorage.h.
Referenced by XMLStorage::const_XMLPos::get(), XMLStorage::XMLPos::get(), and XMLStorage::const_XMLPos::operator[]().
|
inline |
Definition at line 1176 of file xmlstorage.h.
|
inline |
Definition at line 1171 of file xmlstorage.h.
|
inline |
Definition at line 1166 of file xmlstorage.h.
Definition at line 1161 of file xmlstorage.h.
|
inline |
read element node content
Definition at line 1182 of file xmlstorage.h.
|
inline |
Definition at line 1261 of file xmlstorage.h.
Referenced by XMLStorage::XMLPos::go_down(), and XMLStorage::const_XMLPos::go_down().
read content of a subnode specified by an XPath expression
Definition at line 1188 of file xmlstorage.h.
Definition at line 1051 of file xmlstorage.h.
index operator write access to an attribute
Definition at line 1089 of file xmlstorage.h.
|
protected |
write node with children tree to output stream using original white space
Definition at line 528 of file xmlstorage.cpp.
Referenced by write().
|
protected |
print node without any white space
Definition at line 555 of file xmlstorage.cpp.
Referenced by write().
|
protected |
pretty print node with children tree to output stream
Definition at line 579 of file xmlstorage.cpp.
Referenced by write().
write access to an attribute
Definition at line 1083 of file xmlstorage.h.
Referenced by XMLStorage::XMLPos::put().
remove all children named 'name'
Definition at line 1073 of file xmlstorage.h.
Referenced by XMLStorage::XMLPos::remove_children().
set element node content
Definition at line 1199 of file xmlstorage.h.
Referenced by XMLStorage::XMLPos::create_node_content().
|
inline |
set content of a subnode specified by an XPath expression
Definition at line 1205 of file xmlstorage.h.
|
protected |
write node with children tree to output stream using smart formating
Definition at line 612 of file xmlstorage.cpp.
Referenced by write().
|
inline |
convenient storage of distinct values in children node
Definition at line 1123 of file xmlstorage.h.
|
inline |
convenient value access in children node
Definition at line 1112 of file xmlstorage.h.
|
inline |
write node with children tree to output stream
Definition at line 1221 of file xmlstorage.h.
|
friend |
Definition at line 980 of file xmlstorage.h.
Definition at line 979 of file xmlstorage.h.
|
friend |
Definition at line 981 of file xmlstorage.h.
|
friend |
Definition at line 982 of file xmlstorage.h.
Referenced by subvalue().
|
protected |
Definition at line 1271 of file xmlstorage.h.
Referenced by clear(), erase(), get(), get_attributes(), operator=(), operator[](), original_write_worker(), plain_write_worker(), pretty_write_worker(), put(), and smart_write_worker().
|
protected |
Definition at line 1282 of file xmlstorage.h.
Referenced by XMLStorage::XMLReaderBase::EndElementHandler(), original_write_worker(), and smart_write_worker().
|
protected |
Definition at line 1270 of file xmlstorage.h.
Referenced by add_child(), clear(), count(), XMLStorage::XMLPos::delete_this(), XMLStorage::XMLReaderBase::EndElementHandler(), filter(), XMLStorage::XMLReaderBase::finish_read(), get_children(), get_first_child(), operator=(), original_write_worker(), plain_write_worker(), pretty_write_worker(), remove_children(), smart_write_worker(), XMLStorage::XMLReaderBase::StartElementHandler(), XMLStorage::XMLDoc::write(), XMLNode(), and ~XMLNode().
|
protected |
Definition at line 1274 of file xmlstorage.h.
Referenced by clear(), XMLStorage::XMLReaderBase::EndElementHandler(), get_content(), operator=(), original_write_worker(), plain_write_worker(), pretty_write_worker(), set_content(), smart_write_worker(), and XMLStorage::XMLReaderBase::StartElementHandler().
|
protected |
Definition at line 1275 of file xmlstorage.h.
Referenced by clear(), XMLStorage::XMLReaderBase::EndElementHandler(), operator=(), original_write_worker(), and smart_write_worker().
|
protected |
Definition at line 1273 of file xmlstorage.h.
Referenced by clear(), operator=(), original_write_worker(), and smart_write_worker().
|
protected |
Definition at line 1276 of file xmlstorage.h.
Referenced by clear(), XMLStorage::XMLReaderBase::finish_read(), operator=(), original_write_worker(), smart_write_worker(), and XMLStorage::XMLReaderBase::StartElementHandler().