lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
Classes | Functions
lean::xml Namespace Reference

Provides XML utility classes built on the rapidxml library. More...

Classes

class  xml_file
 This convenience class wraps up the most common xml file functionality. More...

Functions

template<class Char , class Range >
LEAN_INLINE Char * allocate_string (rapidxml::xml_document< Char > &document, const Range &string)
 Allocates an XML string from the given document.
template<class Char , class Range1 , class Rage2 >
LEAN_INLINE
rapidxml::xml_attribute< Char > * 
allocate_attribute (rapidxml::xml_document< Char > &document, const Range1 &name, const Rage2 &value)
 Allocates an XML attribute from the given document.
template<class Char , class Range1 , class Rage2 >
LEAN_INLINE void append_attribute (rapidxml::xml_document< Char > &document, rapidxml::xml_node< Char > &node, const Range1 &name, const Rage2 &value)
 Appends an XML attribute to the given node.
template<class Char , class Range >
LEAN_INLINE
nullterminated_range< Char > 
get_attribute (const rapidxml::xml_node< Char > &node, const Range &name)
 Gets the value of the given XML attribute or empty string if not available.
template<class Char , class Traits , class Range >
LEAN_INLINE
nullterminated_range< Char,
Traits > 
get_attribute (const rapidxml::xml_node< Char > &node, const Range &name)
 Gets the value of the given XML attribute or empty string if not available.
template<class Char , class Range , class StringTraits , class StringAlloc >
LEAN_INLINE void get_attribute (const rapidxml::xml_node< Char > &node, const Range &name, std::basic_string< Char, StringTraits, StringAlloc > &value)
 Assigns the value of the given XML attribute to the given variable, if available, otherwise leaves the variable untouched.
template<class Char >
LEAN_INLINE rapidxml::xml_node
< Char > * 
allocate_node (rapidxml::xml_document< Char > &document)
 Allocates an XML node from the given document.
template<class Char , class Range >
LEAN_INLINE rapidxml::xml_node
< Char > * 
allocate_node (rapidxml::xml_document< Char > &document, const Range &name)
 Allocates an XML node from the given document.
template<class Char , class Range1 , class Range2 >
LEAN_INLINE rapidxml::xml_node
< Char > * 
allocate_node (rapidxml::xml_document< Char > &document, const Range1 &name, const Range2 &value)
 Allocates an XML node from the given document.
template<int ParseFlags, class Char >
LEAN_INLINE void load_xml_file (const utf8_ntri &fileName, rapidxml::xml_document< Char > &document)
 Loads an xml document from the given file.
template<int PrintFlags, class Char >
LEAN_INLINE void save_xml_file (const utf8_ntri &fileName, const rapidxml::xml_node< Char > &document)
 Saves an xml document to the given file.

Detailed Description

Provides XML utility classes built on the rapidxml library.