55#error no UNICODE build in Unix version available
64#ifndef _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
65#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
66#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 1
67#define _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES 1
80#include <xercesc/parsers/SAXParser.hpp>
81#include <xercesc/sax/HandlerBase.hpp>
83using XERCES_CPP_NAMESPACE_QUALIFIER Locator;
84using XERCES_CPP_NAMESPACE_QUALIFIER SAXParser;
85using XERCES_CPP_NAMESPACE_QUALIFIER HandlerBase;
86using XERCES_CPP_NAMESPACE_QUALIFIER InputSource;
87using XERCES_CPP_NAMESPACE_QUALIFIER AttributeList;
88using XERCES_CPP_NAMESPACE_QUALIFIER SAXParseException;
92#elif defined(XS_USE_EXPAT)
100#pragma warning(disable: 4786)
106#pragma comment(lib, "xerces-c_2D")
108#pragma comment(lib, "xerces-c_2")
110#elif defined(XS_USE_EXPAT)
113#pragma comment(lib, "libexpatMT")
116#pragma comment(lib, "libexpat")
120#ifndef _STRING_DEFINED
121#if defined(_DEBUG) && defined(_DLL)
123#pragma comment(lib, "xmlstorage-vc9d")
125#pragma comment(lib, "xmlstorage-vc8d")
127#pragma comment(lib, "xmlstorage-vc6d")
132#pragma comment(lib, "xmlstorage-vc9")
134#pragma comment(lib, "xmlstorage-vc8")
136#pragma comment(lib, "xmlstorage-vc6")
140#pragma comment(lib, "xmlstorage-vc9t")
142#pragma comment(lib, "xmlstorage-vc8t")
144#pragma comment(lib, "xmlstorage-vc6t")
148#pragma comment(lib, "xmlstorage-vc6l")
176#ifdef _WCHAR_T_DEFINED
177#define __wchar_t wchar_t
197#define _tcstod strtod
198#define _tcslen strlen
199#define _tcsstr strstr
200#define _snprintf snprintf
201#define _sntprintf snprintf
202#define _vsnprintf vsnprintf
203#define _vsntprintf vsnprintf
204#define _stricmp strcasecmp
205#define _tcsicmp strcasecmp
206#define strnicmp strncasecmp
207#define _tcsnicmp strncasecmp
213#define _stricmp stricmp
226#define BUFFER_LEN 2048
239#define LPCXSSTR LPCSTR
241#define XS_icmp _stricmp
242#define XS_ncmp strncmp
243#define XS_nicmp strnicmp
247#define XS_snprintf _snprintf
248#define XS_vsnprintf _vsnprintf
249#define XS_strstr strstr
252#define XS_TEXT(x) TEXT(x)
253#define LPXSSTR LPTSTR
254#define LPCXSSTR LPCTSTR
255#define XS_cmp _tcscmp
256#define XS_icmp _tcsicmp
257#define XS_ncmp _tcsncmp
258#define XS_nicmp _tcsnicmp
260#define XS_tod _tcstod
261#define XS_len _tcslen
262#define XS_snprintf _sntprintf
263#define XS_vsnprintf _vsntprintf
264#define XS_strstr _tcsstr
269#define COUNTOF _countof
271#define COUNTOF(b) (sizeof(b)/sizeof(b[0]))
279#if defined(_STRING_DEFINED) && !defined(XS_STRING_UTF8)
281#define XS_String String
294#if defined(UNICODE) && !defined(XS_STRING_UTF8)
295 typedef std::wstring
super;
309#if defined(UNICODE) && !defined(XS_STRING_UTF8)
312 XS_String(
const std::string&
s) {assign(
s.c_str());}
313 XS_String& operator=(
LPCSTR s) {assign(
s);
return *
this;}
319 XS_String(
const std::wstring& ws) {assign(
ws.c_str());}
320 XS_String& operator=(
LPCWSTR s) {assign(
s);
return *
this;}
334 XS_String& operator=(
const _ISSD RString&
s) {assign(
s);
return *
this;}
351#elif defined(UNICODE)
406#define XS_EMPTY_STR XS_TEXT("")
407#define XS_TRUE_STR XS_TEXT("true")
408#define XS_FALSE_STR XS_TEXT("false")
409#define XS_INTFMT_STR XS_TEXT("%d")
410#define XS_FLOATFMT_STR XS_TEXT("%f")
412#define XS_KEY_STR XS_TEXT("key")
413#define XS_VALUE_STR XS_TEXT("value")
414#define XS_PROPERTY_STR XS_TEXT("property")
424#define XS_EMPTY XS_EMPTY_STR
425#define XS_TRUE XS_TRUE_STR
426#define XS_FALSE XS_FALSE_STR
427#define XS_INTFMT XS_INTFMT_STR
428#define XS_FLOATFMT XS_FLOATFMT_STR
431extern const XS_String
XS_KEY;
435#define CDATA_START "<![CDATA["
436#define CDATA_END "]]>"
439#ifndef XS_STRING_UTF8
442inline void assign_utf8(XS_String&
s,
const char*
str,
size_t lutf8)
459inline void assign_utf8(XS_String&
s,
const char*
str)
465inline std::string get_utf8(
LPCTSTR s,
size_t l)
483inline std::string get_utf8(
const char*
s,
size_t l)
496inline std::string get_utf8(
const XS_String&
s)
498 return get_utf8(
s.c_str(),
s.length());
508#include <ext/stdio_filebuf.h>
509#define FILE_FILEBUF __gnu_cxx::stdio_filebuf<char>
510#elif defined(_MSC_VER)
511#define FILE_FILEBUF std::filebuf
535#if defined(__STDC_WANT_SECURE_LIB__) && defined(_MS_VER)
543 _buf =
new FILE_FILEBUF(_pfile,
mode);
545 _buf =
new FILE_FILEBUF;
557struct tifstream :
public std::istream, FileHolder
559 typedef std::istream
super;
570struct tofstream :
public std::ostream, FileHolder
572 typedef std::ostream
super;
590#error UNICODE not supported for this platform
617#define XML_INDENT_SPACE " "
620#if defined(XS_USE_XERCES) || defined(XS_USE_EXPAT)
622#if defined(XML_UNICODE) || defined(XS_USE_XERCES)
623typedef XS_String String_from_XML_Char;
625#elif defined(XS_STRING_UTF8)
626typedef XS_String String_from_XML_Char;
631struct String_from_XML_Char :
public XS_String
635 assign_utf8(*
this,
str);
644#if defined(UNICODE) && !defined(XS_STRING_UTF8)
650 const unsigned char*
q = (
const unsigned char*)
s2;
672 std::string
str()
const;
689#ifdef XMLNODE_LOCATION
694 : _pdisplay_path(
NULL),
700 XMLLocation(
const char* display_path,
int line,
int column)
701 : _pdisplay_path(display_path),
707 std::string
str()
const;
710 const char* _pdisplay_path;
736 StyleSheet(
const std::string& href,
const std::string&
type=
"text/xsl",
bool alternate=
false)
744 void print(std::ostream&
out)
const;
753 push_back(stylesheet);
841struct XPath : std::list<XPathElement>
856#if defined(UNICODE) && !defined(XS_STRING_UTF8)
859 struct AttributeMap :
public std::map<XS_String, XS_String>
861 typedef std::map<XS_String, XS_String>
super;
863 const_iterator
find(
const char*
x)
const
865 for(const_iterator it=
begin(); it!=
end(); ++it)
872 const_iterator
find(
const key_type&
x)
const
874 return super::find(
x);
879 return super::find(
x);
884 const_iterator found =
find(
x);
887 return found->second;
898 const_iterator found =
find(
x);
901 return found->second;
919 for(Children::const_iterator it=
other.begin(); it!=
other.end(); ++it)
931 for(Children::const_iterator it=
other.begin(); it!=
other.end(); ++it)
945 for(Children::const_iterator it=
other.begin(); it!=
other.end(); ++it)
1004#ifdef XMLNODE_LOCATION
1005 _location(
other._location),
1009 for(Children::const_iterator it=
other._children.begin(); it!=
other._children.end(); ++it)
1022#ifdef XMLNODE_LOCATION
1023 _location(
other._location),
1097 AttributeMap::const_iterator found =
_attributes.find(attr_name);
1100 return found->second;
1117 return node->get(attr_name);
1132 return (*
node)[attr_name];
1135#if defined(UNICODE) && !defined(XS_STRING_UTF8)
1142 return node->get(attr_name);
1153 node =
new XMLNode(child_name);
1157 return (*
node)[attr_name];
1193 return node->get_content();
1210 node->set_content(
s, cdata);
1216#ifdef XMLNODE_LOCATION
1217 const XMLLocation&
get_location()
const {
return _location;}
1246 return count(xpath.begin(), xpath.end());
1250 int count(XPath::const_iterator
from,
const XPath::const_iterator& to)
const;
1278#ifdef XMLNODE_LOCATION
1279 XMLLocation _location;
1288 XMLNode*
filter(XPath::const_iterator
from,
const XPath::const_iterator& to)
const;
1559 return _cur->
get(attr_name, def);
1677 (*node)[attr_name] = attr_value;
1693#if defined(UNICODE) && !defined(XS_STRING_UTF8)
1695 bool go_down(
const char* child_name,
int n=0)
1707 void create(
const char* child_name)
1715 XMLNode*
node = XPathElement(child_name).find(
_cur);
1724 template<
typename T,
typename U>
1725 void smart_create(
const char* child_name,
const T& attr_name,
const U& attr_value)
1727 XMLNode*
node = XPathElement(child_name, 0, attr_name, attr_value).find(
_cur);
1732 node =
new XMLNode(child_name);
1734 (*node)[attr_name] = attr_value;
1889#if defined(UNICODE) && !defined(XS_STRING_UTF8)
1891 bool go_down(
const char* child_name,
int n=0)
2001 assign(!
operator bool());
2225 :
_ref(
node->subvalue(node_name, attr_name))
2410#pragma warning(disable: 4355)
2416 :
public HandlerBase
2428 InputSource* _source;
2431 virtual void XMLDecl(
const XMLCh*
const versionStr,
const XMLCh*
const encodingStr,
2432 const XMLCh*
const standaloneStr,
const XMLCh*
const actualEncodingStr);
2435 virtual void setDocumentLocator(
const Locator*
const locator);
2436 virtual void startElement(
const XMLCh*
const name, AttributeList& attributes);
2437 virtual void endElement(
const XMLCh*
const name);
2438 virtual void characters(
const XMLCh*
const chars,
const unsigned int length);
2439 virtual void ignorableWhitespace(
const XMLCh*
const chars,
const unsigned int length);
2442 virtual void error(
const SAXParseException&
e);
2443 virtual void fatalError(
const SAXParseException&
e);
2444 virtual void warning(
const SAXParseException&
e);
2445 virtual void resetErrors();
2447#elif defined(XS_USE_EXPAT)
2479#ifndef XS_USE_XERCES
2492#ifdef XMLNODE_LOCATION
2493 const char* _display_path;
2496 const Locator* _locator;
2516#elif defined(XS_USE_EXPAT)
2517 virtual int read_buffer(
char*
buffer,
int len) = 0;
2530#if defined(XS_USE_XERCES) || defined(XS_USE_EXPAT)
2553#define XMLReader XercesXMLReader
2555#elif defined(XS_USE_EXPAT)
2557struct ExpatXMLReader :
public XMLReaderBase
2559 ExpatXMLReader(XMLNode*
node, std::istream&
in)
2560 : XMLReaderBase(
node),
2573 return _in.gcount();
2580#define XMLReader ExpatXMLReader
2605#if defined(_MSC_VER) && _MSC_VER<1400
2607struct fast_ostringbuffer :
public std::streambuf
2610 typedef std::char_traits<_E> _Tr;
2612 explicit fast_ostringbuffer()
2613 {_Init(0, 0, std::_Noread);}
2615 virtual ~fast_ostringbuffer()
2618 std::string
str()
const
2620 {std::string _Str(pbase(),
2621 (_Seekhigh<pptr()? pptr(): _Seekhigh) - pbase());
2624 return std::string();}
2627 virtual int_type
overflow(int_type _C = _Tr::eof())
2628 {
if (_Tr::eq_int_type(_Tr::eof(), _C))
2629 return _Tr::not_eof(_C);
2630 else if (pptr() != 0 && pptr() < epptr())
2631 {*_Pninc() = _Tr::to_char_type(_C);
2634 {
size_t _Os = gptr() == 0 ? 0 : epptr() - eback();
2635 size_t _Ns = _Os + _Alsize;
2636 _E *_P = _Al.allocate(_Ns, (
void *)0);
2638 _Tr::copy(_P, eback(), _Os);
2639 else if (_ALSIZE < _Alsize)
2642 if (_Strmode & std::_Allocated)
2643 _Al.deallocate(eback(), _Os);
2645 _Strmode |= std::_Allocated;
2652 {_Seekhigh = _Seekhigh - eback() + _P;
2653 setp(pbase() - eback() + _P, pptr() - eback() + _P, _P + _Ns);
2655 *_Pninc() = _Tr::to_char_type(_C);
2659 void _Init(
const _E *_S,
size_t _N, std::_Strstate _M)
2660 {_Pendsave = 0, _Seekhigh = 0;
2661 _Alsize = _MINSIZE, _Strmode = _M;
2666 {
if (_Strmode & std::_Allocated)
2667 _Al.deallocate(eback(), (pptr() != 0 ? epptr() : egptr()) - eback());
2669 _Strmode &=
~std::_Allocated;}
2672 enum {_ALSIZE = 65536, _MINSIZE = 32768};
2674 _E *_Pendsave, *_Seekhigh;
2676 std::_Strstate _Strmode;
2677 std::allocator<_E> _Al;
2682 typedef std::iostream super;
2687 std::string
str()
const
2691 fast_ostringbuffer _Sb;
2720#if defined(_STRING_DEFINED) && !defined(XS_STRING_UTF8)
2749#if defined(_STRING_DEFINED) && !defined(XS_STRING_UTF8)
2763 std::istringstream istr(
buffer);
2778#ifdef XMLNODE_LOCATION
2780 _display_path = display_path;
2781 reader._display_path = _display_path.c_str();
2790 if (!
reader.get_errors().empty()) {
2837#ifdef XMLNODE_LOCATION
2838 std::string _display_path;
2854 std::ostringstream
out;
2944 return _stack.top()._attributes[attr_name];
2997#define _XMLSTORAGE_H
ACPI_SIZE strlen(const char *String)
static unsigned char bytes[4]
void get(int argc, const char *argv[])
_In_ uint16_t _Out_ ULONG * atts
static const WCHAR indent[]
static const WCHAR empty[]
#define WideCharToMultiByte
#define MultiByteToWideChar
static const WCHAR version[]
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
void(XMLCALL * XML_EndElementHandler)(void *userData, const XML_Char *name)
void(XMLCALL * XML_StartElementHandler)(void *userData, const XML_Char *name, const XML_Char **atts)
void(XMLCALL * XML_XmlDeclHandler)(void *userData, const XML_Char *version, const XML_Char *encoding, int standalone)
struct XML_ParserStruct * XML_Parser
void(XMLCALL * XML_DefaultHandler)(void *userData, const XML_Char *s, int len)
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLdouble GLdouble GLdouble GLdouble q
GLboolean GLboolean GLboolean b
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLuint GLsizei GLsizei * length
const GLuint GLenum const GLvoid * binary
static HRESULT get_location(HTMLInnerWindow *This, HTMLLocation **ret)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
static const struct access_res create[16]
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
std::ostringstream fast_ostringstream
@ FORMAT_SMART
write XML without any white space
@ FORMAT_ORIGINAL
preserve original white space and comments if present; pretty print otherwise
@ FORMAT_PRETTY
write XML stream preserving original white space and comments
void read_option(T &var, const_XMLPos &cfg, LPCXSSTR key)
std::string EncodeXMLString(const XS_String &str, bool cdata)
encode XML string literals
const XS_String XS_PROPERTY
const char * get_xmlsym_end_utf8(const char *p)
XS_String DecodeXMLString(const std::string &str)
decode XML string literals
static unsigned __int64 next
__crt_unique_heap_ptr< wchar_t > const wstring(_malloc_crt_t(wchar_t, maxsize))
XML document type description.
void parse(const char *str)
list of StyleSheet entries
void set(const StyleSheet &stylesheet)
void print(std::ostream &out) const
StyleSheet(const std::string &href, const std::string &type="text/xsl", bool alternate=false)
type converter for boolean data with write access
XMLBoolRef(XMLNode *node, const XS_String &attr_name, bool def=false)
XMLBoolRef & operator=(bool value)
type converter for boolean data
XMLBool(bool value=false)
void operator=(const XMLBool &)
XMLBool(LPCXSSTR value, bool def=false)
XMLBool(const XMLNode *node, const XS_String &attr_name, bool def=false)
XMLNode::Children::iterator BaseIterator
bool operator==(const myType &other) const
iterator(BaseIterator begin, BaseIterator end, const XS_String &filter_name)
bool operator!=(const myType &other) const
const XMLNode * operator*() const
iterator access to children nodes with name filtering
XMLChildrenFilter(XMLNode::Children &children, const XS_String &name)
XMLChildrenFilter(XMLNode *node, const XS_String &name)
bool read_buffer(const char *buffer, size_t len, const std::string &system_id=std::string())
bool read_buffer(const std::string &buffer, const std::string &system_id=std::string())
bool read(XMLReaderBase &reader, const std::string &display_path)
bool write_file(LPCTSTR path, WRITE_MODE mode=FORMAT_SMART) const
bool write(std::ostream &out, WRITE_MODE mode=FORMAT_SMART) const
write XML stream
bool read_file(LPCTSTR path)
bool read_stream(std::istream &in, const std::string &system_id=std::string())
bool write_formating(LPCTSTR path) const
bool write_formating(std::ostream &out) const
write XML stream with formating
type converter for numeric data with write access
XMLDoubleRef & operator=(double value)
void assign(double value)
XMLDoubleRef(XMLNode *node, const XS_String &attr_name, double def=0.)
type converter for numeric data
XMLDouble(const XMLNode *node, const XS_String &attr_name, double def=0.)
XMLDouble(LPCXSSTR value, double def=0.)
void operator=(const XMLDouble &)
XS_String str() const
return merged error strings
XML Error with message and location.
std::string str() const
return formated error message
friend std::ostream & operator<<(std::ostream &, const XMLError &err)
type converter for integer data with write access
XMLIntRef(XMLNode *node, const XS_String &attr_name, int def=0)
XMLIntRef & operator=(int value)
type converter for integer data
void operator=(const XMLInt &)
XMLInt(LPCXSSTR value, int def=0)
XMLInt(const XMLNode *node, const XS_String &attr_name, int def=0)
helper structure to read XML messages from strings
XMLMessageFromString(const std::string &xml_str, const std::string &system_id=std::string())
XMLMessageReader(const std::string &xml_str, const std::string &system_id=std::string())
const XMLDoc & get_document()
std::string toString() const
XMLMessage(const char *name)
map of XML node attributes
XS_String get(const char *x, LPCXSSTR def=XS_EMPTY_STR) const
internal children node list
void move(Children &other)
std::list< XMLNode * > super
bool remove(XMLNode *node)
Children & operator=(Children &other)
void copy(const Children &other)
void assign(Children &other)
Children(Children &other)
in memory representation of an XML node
void remove_children(const XS_String &name)
remove all children named 'name'
const XMLNode * find_relative(const XPath &xpath) const
XPath find function (const)
XS_String get_sub_content(const XPath &xpath) const
read content of a subnode specified by an XPath expression
XMLNode * create_relative(const XPath &xpath)
relative XPath create function
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
void put(const XS_String &attr_name, const XS_String &value)
write access to an attribute
XMLNode(const XMLNode &other, COPY_FLAGS copy_no_children)
Children & get_children()
XMLNode * get_first_child() const
friend struct XPathElement
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 AttributeMap & get_attributes() const
void set_content(const XS_String &s, bool cdata=false)
set element node content
AttributeMap & get_attributes()
bool filter(const XPath &xpath, XMLNode &target) const
copy matching tree nodes using the given XPath filter expression
void add_child(XMLNode *child)
add a new child node
void smart_write_worker(std::ostream &out, const XMLFormat &format, int indent) const
write node with children tree to output stream using smart formating
void pretty_write_worker(std::ostream &out, const XMLFormat &format, int indent) const
pretty print node with children tree to output stream
XS_String get(const T &attr_name, LPCXSSTR def=XS_EMPTY_STR) const
read only access to an attribute
XS_String subvalue(const XS_String &child_name, const XS_String &attr_name, int n=0) const
convenient value access in children node
const Children & get_children() const
void plain_write_worker(std::ostream &out) const
print node without any white space
bool set_sub_content(const XPath &xpath, const XS_String &s, bool cdata=false)
set content of a subnode specified by an XPath expression
XMLNode(const XMLNode &other)
XS_String & operator[](const XS_String &attr_name)
index operator write access to an attribute
void erase(const XS_String &attr_name)
remove the attribute 'attr_name'
XMLNode & operator=(const XMLNode &other)
XMLNode(const XS_String &name, const std::string &leading)
void original_write_worker(std::ostream &out) const
write node with children tree to output stream using original white space
XMLNode(const XS_String &name)
int count(const XPath &xpath) const
count the nodes matching the given relative XPath expression
XS_String get_content() const
read element node content
XMLPos(const XMLPos &other, const XS_String &name, const XS_String &attr_name, const XS_String &attr_value)
XMLPos(XMLNode *node, const XS_String &name, const XS_String &attr_name, const XS_String &attr_value)
std::stack< XMLNode * > _stack
XS_String get(const XS_String &attr_name, LPCXSSTR def=XS_EMPTY_STR) const
attribute access
void set_property(const XS_String &key, const struct XMLBool &value, const XS_String &name=XS_PROPERTY)
const XS_String & operator[](const XS_String &attr_name) const
bool delete_this()
delete current node and go back to previous position
bool back()
go back to previous position
void put(const XS_String &attr_name, const XS_String &value)
attribute setting
XMLPos(XMLNode *node, const XS_String &name)
void create_node_content(const XS_String &node_name, const XS_String &content)
create node with string content
void add_down(XMLNode *child)
insert children when building tree
bool go_down()
go down to first child
const XS_String & str() const
void smart_create(const XS_String &child_name, const XS_String &attr_name, const XS_String &attr_value)
search matching child node identified by key name and an attribute value
XMLPos(const XMLPos &other)
bool go(const XPath &xpath)
move to the position defined by xpath in XML tree
void smart_create(const XS_String &child_name)
create node if not already existing and move to it
void go_to(XMLNode *child)
go to specified node
const XMLNode & operator*() const
void remove_children(const XS_String &name)
remove all children named 'name'
XMLPos(const XMLPos &other, const XS_String &name)
void set_property(const XS_String &key, const char *value, const XS_String &name=XS_PROPERTY)
XS_String & operator[](const XS_String &attr_name)
const XMLNode * operator->() const
bool iterate(const XS_String &child_name, size_t &cnt)
iterate to the next matching child
void create(const XS_String &name)
create node and move to it
bool create_relative(const XPath &xpath)
create child nodes using XPath notation and move to the deepest child
void set_property(const XS_String &key, int value, const XS_String &name=XS_PROPERTY)
XS_String get(const T &attr_name) const
index operator attribute access
XMLNode & cur()
access to current node
const XMLNode & cur() const
int count(const XPath &xpath) const
count the nodes matching the given relative XPath expression
bool go_down(const XS_String &child_name, int n=0)
search for child and go down
void erase(const XS_String &attr_name)
remove the attribute 'attr_name' from the current node
int filter(const XPath &xpath, XMLNode &target) const
create a new node tree using the given XPath filter expression
bool operator==(const myType &other) const
const_iterator(BaseIterator begin, BaseIterator end)
const_XMLChildrenFilter::const_iterator BaseIterator
XMLProperty operator*() const
bool operator!=(const myType &other) const
const XMLNode * get_node() const
utility class to read property settings from a XML tree
XMLPropertyReader(const XMLNode::Children &children)
const_XMLChildrenFilter _filter
XMLPropertyReader(const XMLNode *node)
a key/value pair for property data access
XMLProperty(const XMLNode *node)
enum XMLStorage::XMLReaderBase::@1556 _last_tag
virtual void StartElementHandler(const XS_String &name, const XMLNode::AttributeMap &attributes)
notifications about XML start tag
virtual void XmlDeclHandler(const char *version, const char *encoding, int standalone)
store XML version and encoding into XML reader
XMLReaderBase(XMLNode *node)
const char * get_endl() const
void read()
read XML stream into XML tree below _pos
const XMLFormat & get_format() const
virtual void EndElementHandler()
notifications about XML end tag
const XMLErrorList & get_errors() const
std::string get_position() const
return current parser position as string
const XMLErrorList & get_warnings() const
int get()
read one character from XML stream
XMLReader(XMLNode *node, std::istream &in)
type converter for string data with write access
XMLStringRef(const XS_String &node_name, XMLNode *node, const XS_String &attr_name, LPCXSSTR def=XS_EMPTY)
XMLStringRef(XMLNode *node, const XS_String &attr_name, LPCXSSTR def=XS_EMPTY)
XMLStringRef & operator=(const XS_String &value)
void assign(const XS_String &value)
type converter for string data
XMLString(LPCXSSTR value, LPCXSSTR def=XS_EMPTY)
const XS_String & c_str() const
XMLString(const XS_String &value)
void operator=(const XMLString &)
XMLString(const XMLNode *node, const XS_String &attr_name, LPCXSSTR def=XS_EMPTY)
container for XMLWriter state information
static XS_String s_empty_attr
void write_pre(StackEntry &entry)
void put(const XS_String &attr_name, const XS_String &value)
attribute setting
void close_pre(StackEntry &entry)
XMLWriter(LPCTSTR path, const XMLFormat &format=XMLFormat())
XMLWriter(std::ostream &out, const XMLFormat &format=XMLFormat())
XMLNode::AttributeMap AttrMap
void set_content(const XS_String &s, bool cdata=false)
XS_String & operator[](const XS_String &attr_name)
index operator write access to an attribute
void write_post(StackEntry &entry)
bool back()
go back to previous position
void write_attributes(StackEntry &entry)
void create_node_content(const XS_String &node_name, const XS_String &content)
create node with string content
std::stack< StackEntry > _stack
const char * parse(const char *path)
XMLNode * find(XMLNode *node) const
const XMLNode * const_find(const XMLNode *node) const
XPathElement(const XS_String &child_name, int child_idx=-1)
XPathElement(const XS_String &child_name, int child_idx, const XS_String &attr_name, const XS_String &attr_value)
XPath(const std::string path)
string class for TCHAR strings
XS_String & printf(LPCXSSTR fmt,...)
void assign(LPCXSSTR s, size_t l)
XS_String & operator=(LPCXSSTR s)
XS_String(const XS_String &other)
XS_String & vprintf(LPCXSSTR fmt, va_list l)
XS_String & operator=(const super &s)
XS_String(const super &other)
XS_String(LPCXSSTR s, size_t l)
void assign(const XS_String &s)
XS_String & appendf(LPCXSSTR fmt,...)
XS_String & vappendf(LPCXSSTR fmt, va_list l)
bool operator!=(const myType &other) const
const XMLNode * operator*() const
bool operator==(const myType &other) const
XMLNode::Children::const_iterator BaseIterator
const_iterator(BaseIterator begin, BaseIterator end, const XS_String &filter_name)
read only iterator access to children nodes with name filtering
const_XMLChildrenFilter(const XMLNode::Children &children, const XS_String &name)
const_XMLChildrenFilter(const XMLNode *node, const XS_String &name)
bool back()
go back to previous position
XS_String get(const XS_String &attr_name) const
attribute access
XS_String get(const T &attr_name) const
index operator attribute access
bool iterate(const XS_String &child_name, size_t &cnt)
iterate to the next matching child
const XS_String & str() const
const_XMLPos(const XMLNode *root)
const XMLNode * operator->() const
const XMLNode & operator*() const
void go_to(const XMLNode *child)
go to specified node
bool go_down()
go down to first child
const_XMLPos(const const_XMLPos &other)
std::stack< const XMLNode * > _stack
const_XMLPos(const XMLPos &other)
bool go(const XPath &xpath)
move to the position defined by xpath in XML tree
XS_String operator[](const XS_String &attr_name) const
bool go_down(const XS_String &child_name, int n=0)
search for child and go down
const XMLNode & cur() const
access to current node
tifstream(const char *path)
tofstream(const char *path)
bool operator==(const TKeyDef &t1, const TKeyDef &t2)
#define new(TYPE, numElems)
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out