55 #error no UNICODE build in Unix version available 57 #ifndef XS_STRING_UTF8 58 #define XS_STRING_UTF8 63 #if _MSC_VER>=1400 // VS2005 or higher 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 75 #ifndef XS_STRING_UTF8 76 #define XS_STRING_UTF8 80 #include <xercesc/parsers/SAXParser.hpp> 81 #include <xercesc/sax/HandlerBase.hpp> 83 using XERCES_CPP_NAMESPACE_QUALIFIER Locator;
84 using XERCES_CPP_NAMESPACE_QUALIFIER SAXParser;
85 using XERCES_CPP_NAMESPACE_QUALIFIER HandlerBase;
86 using XERCES_CPP_NAMESPACE_QUALIFIER InputSource;
87 using XERCES_CPP_NAMESPACE_QUALIFIER AttributeList;
88 using XERCES_CPP_NAMESPACE_QUALIFIER SAXParseException;
92 #elif defined(XS_USE_EXPAT) 100 #pragma warning(disable: 4786) 102 #ifndef XS_NO_COMMENT 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 // _STRING_DEFINED only allowed if using xmlstorage.cpp embedded in the project 121 #if defined(_DEBUG) && defined(_DLL) // DEBUG version only supported with MSVCRTD 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") 151 #endif // _STRING_DEFINED 153 #endif // XS_NO_COMMENT 176 #ifdef _WCHAR_T_DEFINED 177 #define __wchar_t wchar_t 196 #define _tfopen fopen 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 235 #ifdef XS_STRING_UTF8 238 #define LPXSSTR LPSTR 239 #define LPCXSSTR LPCSTR 240 #define XS_cmp strcmp 241 #define XS_icmp _stricmp 242 #define XS_ncmp strncmp 243 #define XS_nicmp strnicmp 245 #define XS_tod strtod 246 #define XS_len strlen 247 #define XS_snprintf _snprintf 248 #define XS_vsnprintf _vsnprintf 249 #define XS_strstr strstr 251 #define XS_CHAR TCHAR 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 283 #else // _STRING_DEFINED, !XS_STRING_UTF8 289 : public
std::wstring
294 #if defined(UNICODE) && !defined(XS_STRING_UTF8) 295 typedef std::wstring
super;
309 #if defined(UNICODE) && !defined(XS_STRING_UTF8) 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;}
321 #ifdef XS_STRING_UTF8 324 #else // if !UNICODE && !XS_STRING_UTF8 334 XS_String& operator=(
const _ISSD RString&
s) {assign(
s);
return *
this;}
337 #ifdef XS_STRING_UTF8 349 #ifdef XS_STRING_UTF8 351 #elif defined(UNICODE) 401 #endif // _STRING_DEFINED, !XS_STRING_UTF8 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 431 extern const XS_String
XS_KEY;
435 #define CDATA_START "<![CDATA[" 436 #define CDATA_END "]]>" 439 #ifndef XS_STRING_UTF8 442 inline void assign_utf8(XS_String&
s,
const char*
str,
size_t lutf8)
459 inline void assign_utf8(XS_String&
s,
const char*
str)
498 return get_utf8(
s.c_str(),
s.length());
501 #endif // XS_STRING_UTF8 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) // secure CRT functions using VS 2005 536 if (_tfopen_s(&_pfile,
path, modestr) != 0)
543 _buf =
new FILE_FILEBUF(_pfile,
mode);
545 _buf =
new FILE_FILEBUF;
587 #else // FILE_FILEBUF 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) // Are Expat/Xerces XML strings UTF-16 encoded? 623 typedef XS_String String_from_XML_Char;
625 #elif defined(XS_STRING_UTF8) 626 typedef XS_String String_from_XML_Char;
631 struct String_from_XML_Char :
public XS_String
635 assign_utf8(*
this,
str);
641 #endif // defined(XS_USE_XERCES) || defined(XS_USE_EXPAT) 644 #if defined(UNICODE) && !defined(XS_STRING_UTF8) 650 const unsigned char*
q = (
const unsigned char*)
s2;
689 #ifdef XMLNODE_LOCATION 694 : _pdisplay_path(
NULL),
700 XMLLocation(
const char* display_path,
int line,
int column)
701 : _pdisplay_path(display_path),
710 const char* _pdisplay_path;
753 push_back(stylesheet);
856 #if defined(UNICODE) && !defined(XS_STRING_UTF8) 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 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);
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) 1694 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) 1890 bool go_down(
const char* child_name,
int n=0)
2001 assign(!
operator bool());
2225 :
_ref(
node->subvalue(node_name, attr_name))
2254 template<
typename T>
2410 #pragma warning(disable: 4355) 2415 #ifdef XS_USE_XERCES
2416 :
public HandlerBase
2419 #ifdef XS_USE_XERCES 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) // !XS_USE_XERCES 2462 #else // XS_USE_EXPAT 2479 #ifndef XS_USE_XERCES 2492 #ifdef XMLNODE_LOCATION 2493 const char* _display_path;
2495 #ifdef XS_USE_XERCES 2496 const Locator* _locator;
2514 #ifdef XS_USE_XERCES 2516 #elif defined(XS_USE_EXPAT) 2517 virtual int read_buffer(
char*
buffer,
int len) = 0;
2519 virtual int get() = 0;
2530 #if defined(XS_USE_XERCES) || defined(XS_USE_EXPAT) 2540 #ifdef XS_USE_XERCES 2553 #define XMLReader XercesXMLReader 2555 #elif defined(XS_USE_EXPAT) 2557 struct ExpatXMLReader :
public XMLReaderBase
2560 : XMLReaderBase(
node),
2573 return _in.gcount();
2580 #define XMLReader ExpatXMLReader 2582 #else // XS_USE_XERCES, XS_USE_EXPAT 2602 #endif // XS_USE_XERCES 2605 #if defined(_MSC_VER) && _MSC_VER<1400 2610 typedef std::char_traits<_E> _Tr;
2612 explicit fast_ostringbuffer()
2613 {_Init(0, 0, std::_Noread);}
2615 virtual ~fast_ostringbuffer()
2621 (_Seekhigh<pptr()? pptr(): _Seekhigh) - pbase());
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);
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;
2691 fast_ostringbuffer _Sb;
2715 #ifdef XS_USE_XERCES 2720 #if defined(_STRING_DEFINED) && !defined(XS_STRING_UTF8) 2739 #else // XS_USE_XERCES 2749 #if defined(_STRING_DEFINED) && !defined(XS_STRING_UTF8) 2774 #endif // XS_USE_XERCES 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 2944 return _stack.top()._attributes[attr_name];
2997 #define _XMLSTORAGE_H 2998 #endif // _XMLSTORAGE_H
void operator=(const XMLInt &)
XML Error with message and location.
XMLReaderBase(XMLNode *node)
type converter for numeric data
helper structure to read XML messages from strings
XMLNode(const XS_String &name)
XS_String get(const T &attr_name, LPCXSSTR def=XS_EMPTY_STR) const
read only access to an attribute
write XML stream preserving original white space and comments
iterator access to children nodes with name filtering
void write_pre(StackEntry &entry)
bool write_formating(std::ostream &out) const
write XML stream with formating
const XMLNode & cur() const
bool remove(XMLNode *node)
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 set(const StyleSheet &stylesheet)
XMLWriter(std::ostream &out, const XMLFormat &format=XMLFormat())
const XMLNode * find_relative(const XPath &xpath) const
XPath find function (const)
XMLString(const XMLNode *node, const XS_String &attr_name, LPCXSSTR def=XS_EMPTY)
static const WCHAR indent[]
bool read_stream(std::istream &in, const std::string &system_id=std::string())
XMLString(const XS_String &value)
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
#define WideCharToMultiByte
#define new(TYPE, numElems)
std::string get_position() const
return current parser position as string
std::stack< const XMLNode * > _stack
void operator=(const XMLBool &)
XS_String & operator[](const XS_String &attr_name)
bool create_relative(const XPath &xpath)
create child nodes using XPath notation and move to the deepest child
basic_ostream< char, char_traits< char > > ostream
XMLIntRef(XMLNode *node, const XS_String &attr_name, int def=0)
bool go_down()
go down to first child
XMLNode * find(XMLNode *node) const
const char * get_endl() const
void set_property(const XS_String &key, const char *value, const XS_String &name=XS_PROPERTY)
basic_ostringstream< char, char_traits< char >, allocator< char > > ostringstream
ACPI_SIZE strlen(const char *String)
const XS_String XS_PROPERTY
a key/value pair for property data access
type converter for integer data with write access
XMLIntRef & operator=(int value)
const_XMLPos(const XMLPos &other)
XMLDoubleRef & operator=(double value)
const_XMLChildrenFilter(const XMLNode *node, const XS_String &name)
XS_String & appendf(LPCXSSTR fmt,...)
bool operator!=(const myType &other) const
bool read_file(LPCTSTR path)
const XS_String & c_str() const
type converter for string data
XS_String & operator[](const XS_String &attr_name)
index operator write access to an attribute
XMLString(LPCXSSTR value, LPCXSSTR def=XS_EMPTY)
void(XMLCALL * XML_DefaultHandler)(void *userData, const XML_Char *s, int len)
XPathElement(const XS_String &child_name, int child_idx, const XS_String &attr_name, const XS_String &attr_value)
XS_String & vprintf(LPCXSSTR fmt, va_list l)
void add_child(XMLNode *child)
add a new child node
const XS_String & str() const
void create(const XS_String &name)
create node and move to it
AttributeMap & get_attributes()
XMLBool(const XMLNode *node, const XS_String &attr_name, bool def=false)
bool iterate(const XS_String &child_name, size_t &cnt)
iterate to the next matching child
const XMLNode * operator *() const
GLint GLint GLint GLint GLint x
XMLStringRef(XMLNode *node, const XS_String &attr_name, LPCXSSTR def=XS_EMPTY)
std::ostringstream fast_ostringstream
XMLPos(XMLNode *node, const XS_String &name, const XS_String &attr_name, const XS_String &attr_value)
void(XMLCALL * XML_XmlDeclHandler)(void *userData, const XML_Char *version, const XML_Char *encoding, int standalone)
XMLWriter(LPCTSTR path, const XMLFormat &format=XMLFormat())
virtual void StartElementHandler(const XS_String &name, const XMLNode::AttributeMap &attributes)
notifications about XML start tag
void assign(double value)
std::list< XMLNode * > super
bool read(XMLReaderBase &reader, const std::string &display_path)
int get()
read one character from XML stream
utility class to read property settings from a XML tree
XMLProperty(const XMLNode *node)
void assign(LPCXSSTR s, size_t l)
static void append(struct dump_context *dc, const void *data, unsigned size)
void write_post(StackEntry &entry)
const_XMLChildrenFilter _filter
const XS_String & operator[](const XS_String &attr_name) const
bool write(std::ostream &out, WRITE_MODE mode=FORMAT_SMART) const
write XML stream
void put(const XS_String &attr_name, const XS_String &value)
attribute setting
void set_content(const XS_String &s, bool cdata=false)
set element node content
void plain_write_worker(std::ostream &out) const
print node without any white space
type converter for numeric data with write access
XMLChildrenFilter(XMLNode *node, const XS_String &name)
bool operator==(const myType &other) const
const_iterator(BaseIterator begin, BaseIterator end)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
XMLNode & operator=(const XMLNode &other)
XS_String subvalue(const XS_String &child_name, const XS_String &attr_name, int n=0) const
convenient value access in children node
bool go_down()
go down to first child
bool back()
go back to previous position
const XMLNode & operator *() const
const XMLErrorList & get_errors() const
const XMLNode * get_node() const
friend struct XPathElement
const XMLErrorList & get_warnings() const
struct XML_ParserStruct * XML_Parser
void set_content(const XS_String &s, bool cdata=false)
bool back()
go back to previous position
container for XMLWriter state information
void create_node_content(const XS_String &node_name, const XS_String &content)
create node with string content
const_XMLChildrenFilter::const_iterator BaseIterator
static unsigned char bytes[4]
bool go_down(const XS_String &child_name, int n=0)
search for child and go down
XS_String & vappendf(LPCXSSTR fmt, va_list l)
XMLNode::Children::iterator BaseIterator
void erase(const XS_String &attr_name)
remove the attribute 'attr_name'
int count(const XPath &xpath) const
count the nodes matching the given relative XPath expression
map of XML node attributes
void smart_create(const XS_String &child_name)
create node if not already existing and move to it
XMLPropertyReader(const XMLNode::Children &children)
const XMLNode & operator *() const
XMLInt(LPCXSSTR value, int def=0)
void go_to(const XMLNode *child)
go to specified node
XMLProperty operator *() const
StyleSheet(const std::string &href, const std::string &type="text/xsl", bool alternate=false)
GLenum GLuint GLenum GLsizei length
XMLBool(bool value=false)
virtual void XmlDeclHandler(const char *version, const char *encoding, int standalone)
store XML version and encoding into XML reader
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
bool iterate(const XS_String &child_name, size_t &cnt)
iterate to the next matching child
XMLBoolRef(XMLNode *node, const XS_String &attr_name, bool def=false)
XMLStringRef & operator=(const XS_String &value)
basic_ifstream< char, char_traits< char > > ifstream
bool go_down(const XS_String &child_name, int n=0)
search for child and go down
static const WCHAR version[]
bool set_sub_content(const XPath &xpath, const XS_String &s, bool cdata=false)
set content of a subnode specified by an XPath expression
const_XMLPos(const XMLNode *root)
XMLMessageFromString(const std::string &xml_str, const std::string &system_id=std::string())
void erase(const XS_String &attr_name)
remove the attribute 'attr_name' from the current node
bool write_formating(LPCTSTR path) const
type converter for integer data
XS_String & subvalue(const XS_String &child_name, const XS_String &attr_name, int n=0)
convenient storage of distinct values in children node
type converter for boolean data
XMLMessageReader(const std::string &xml_str, const std::string &system_id=std::string())
XS_String get(const T &attr_name) const
index operator attribute access
void create(const XS_String &name)
create node and move to it
std::string str() const
return formated error message
typedef bool(CARDLIBPROC *pCanDragProc)(CardRegion &stackobj
XS_String DecodeXMLString(const std::string &str)
decode XML string literals
const XMLNode & cur() const
access to current node
const_XMLPos(const const_XMLPos &other)
XS_String(const super &other)
XMLPos(XMLNode *node, const XS_String &name)
XS_String & operator[](const XS_String &attr_name)
index operator write access to an attribute
void assign(Children &other)
bool delete_this()
delete current node and go back to previous position
tifstream(const char *path)
XS_String get(const XS_String &attr_name) const
attribute access
XMLNode * get_first_child() const
void get(int argc, const char *argv[])
GLboolean GLboolean GLboolean b
bool matches(const XMLNode &node, int &n) const
XPath(const std::string path)
XMLPos(const XMLPos &other)
XS_String & printf(LPCXSSTR fmt,...)
in memory representation of an XML node
basic_ofstream< char, char_traits< char > > ofstream
XS_String operator[](const XS_String &attr_name) const
XMLPos(const XMLPos &other, const XS_String &name)
const char * get_xmlsym_end_utf8(const char *p)
XS_String get_sub_content(const XPath &xpath) const
read content of a subnode specified by an XPath expression
basic_istream< char, char_traits< char > > istream
bool read_buffer(const std::string &buffer, const std::string &system_id=std::string())
internal children node list
preserve original white space and comments if present; pretty print otherwise
void go_to(XMLNode *child)
go to specified node
void operator=(const XMLDouble &)
XMLNode::Children::const_iterator BaseIterator
XS_String get(const XS_String &attr_name, LPCXSSTR def=XS_EMPTY_STR) const
attribute access
GLdouble GLdouble GLdouble GLdouble q
const GLuint GLenum const GLvoid * binary
XMLInt(const XMLNode *node, const XS_String &attr_name, int def=0)
XS_String get(const T &attr_name) const
index operator attribute access
void(XMLCALL * XML_StartElementHandler)(void *userData, const XML_Char *name, const XML_Char **atts)
bool operator!=(const myType &other) const
static HRESULT get_location(HTMLInnerWindow *This, HTMLLocation **ret)
const XMLNode * operator *() const
bool operator==(const TKeyDef &t1, const TKeyDef &t2)
void assign(const XS_String &s)
XMLNode::AttributeMap AttrMap
Children(Children &other)
void add_down(XMLNode *child)
insert children when building tree
const XMLNode * const_find(const XMLNode *node) const
XMLDouble(LPCXSSTR value, double def=0.)
bool operator==(const myType &other) const
GLsizei const GLfloat * value
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
const XMLNode * operator->() const
WDF_CHILD_LIST_ITERATOR iterator
void pretty_write_worker(std::ostream &out, const XMLFormat &format, int indent) const
pretty print node with children tree to output stream
const XMLFormat & get_format() const
void create_node_content(const XS_String &node_name, const XS_String &content)
create node with string content
_Check_return_ _CRTIMP int __cdecl __cdecl eof(_In_ int _FileHandle)
write XML without any white space
std::stack< XMLNode * > _stack
XMLNode(const XS_String &name, const std::string &leading)
void smart_write_worker(std::ostream &out, const XMLFormat &format, int indent) const
write node with children tree to output stream using smart formating
std::stack< StackEntry > _stack
void read()
read XML stream into XML tree below _pos
void remove_children(const XS_String &name)
remove all children named 'name'
basic_istringstream< char, char_traits< char >, allocator< char > > istringstream
static unsigned __int64 next
const char * parse(const char *path)
XMLMessage(const char *name)
XS_String get_content() const
read element node content
iterator(BaseIterator begin, BaseIterator end, const XS_String &filter_name)
bool back()
go back to previous position
void assign(const XS_String &value)
XMLBool(LPCXSSTR value, bool def=false)
const Children & get_children() const
void operator=(const XMLString &)
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
const_XMLChildrenFilter(const XMLNode::Children &children, const XS_String &name)
virtual void EndElementHandler()
notifications about XML end tag
XMLPos(const XMLPos &other, const XS_String &name, const XS_String &attr_name, const XS_String &attr_value)
XS_String & operator=(const super &s)
std::string EncodeXMLString(const XS_String &str, bool cdata)
encode XML string literals
type converter for string data with write access
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define MultiByteToWideChar
XMLNode(const XMLNode &other, COPY_FLAGS copy_no_children)
XMLReader(XMLNode *node, std::istream &in)
XPathElement(const XS_String &child_name, int child_idx=-1)
int count(const XPath &xpath) const
count the nodes matching the given relative XPath expression
void put(const XS_String &attr_name, const XS_String &value)
write access to an attribute
const XS_String & str() const
XMLBoolRef & operator=(bool value)
bool filter(const XPath &xpath, XMLNode &target) const
copy matching tree nodes using the given XPath filter expression
Children & get_children()
void init(const char *path)
XML document type description.
tofstream(const char *path)
void write_attributes(StackEntry &entry)
XS_String(LPCXSSTR s, size_t l)
basic_streambuf< char, char_traits< char > > streambuf
void put(const XS_String &attr_name, const XS_String &value)
attribute setting
void copy(const Children &other)
bool read_buffer(const char *buffer, size_t len, const std::string &system_id=std::string())
const_iterator(BaseIterator begin, BaseIterator end, const XS_String &filter_name)
enum XMLStorage::XMLReaderBase::@1495 _last_tag
std::string toString() const
GLuint GLuint GLsizei GLenum type
void remove_children(const XS_String &name)
remove all children named 'name'
bool go(const XPath &xpath)
move to the position defined by xpath in XML tree
XMLDouble(const XMLNode *node, const XS_String &attr_name, double def=0.)
XMLNode & cur()
access to current node
friend std::ostream & operator<<(std::ostream &, const XMLError &err)
bool go(const XPath &xpath)
move to the position defined by xpath in XML tree
void(XMLCALL * XML_EndElementHandler)(void *userData, const XML_Char *name)
void print(std::ostream &out) const
void move(Children &other)
XS_String(const XS_String &other)
basic_iostream< char, char_traits< char > > iostream
XMLStringRef(const XS_String &node_name, XMLNode *node, const XS_String &attr_name, LPCXSSTR def=XS_EMPTY)
Children & operator=(Children &other)
XMLNode * create_relative(const XPath &xpath)
relative XPath create function
const AttributeMap & get_attributes() const
bool write_file(LPCTSTR path, WRITE_MODE mode=FORMAT_SMART) const
void close_pre(StackEntry &entry)
virtual void DefaultHandler(const std::string &s)
store content, white space and comments
XMLChildrenFilter(XMLNode::Children &children, const XS_String &name)
list of StyleSheet entries
void set_property(const XS_String &key, int value, const XS_String &name=XS_PROPERTY)
XS_String get(const char *x, LPCXSSTR def=XS_EMPTY_STR) const
read only iterator access to children nodes with name filtering
type converter for boolean data with write access
bool operator!=(const myType &other) const
void original_write_worker(std::ostream &out) const
write node with children tree to output stream using original white space
XMLNode(const XMLNode &other)
XS_String & operator=(LPCXSSTR s)
string class for TCHAR strings
XS_String str() const
return merged error strings
_In_ uint16_t _Out_ ULONG * atts
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum map
static XS_String s_empty_attr
XMLDoubleRef(XMLNode *node, const XS_String &attr_name, double def=0.)
const XMLDoc & get_document()
void read_option(T &var, const_XMLPos &cfg, LPCXSSTR key)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
bool operator==(const myType &other) const
const XMLNode * operator->() const
int filter(const XPath &xpath, XMLNode &target) const
create a new node tree using the given XPath filter expression
XMLPropertyReader(const XMLNode *node)
void parse(const char *str)