49#if !defined(XS_USE_EXPAT) && !defined(XS_USE_XERCES)
64 error._message =
"XML parsing error";
108 *
_wptr++ =
static_cast<char>(
c);
111 const std::string&
str(
bool utf8)
113#if defined(_WIN32) && !defined(XS_STRING_UTF8)
117#if defined(_WIN32) && !defined(XS_STRING_UTF8)
181 while(*
p && *
p!=
'>' && *
p!=
'/') {
185 const char* attr_name =
p;
192 size_t attr_len =
p - attr_name;
194 if (*++
p!=
'"' && *
p!=
'\'')
200 while(*
p && *
p!=delim)
203 size_t value_len =
p -
value;
212 assign_utf8(name_str, attr_name, attr_len);
230 bool in_comment =
false;
233 if (in_comment ||
c==
'<') {
250 const char*
str =
b.c_str();
252 if (in_comment || !
strncmp(
str+1,
"!--", 3)) {
262 }
else if (
str[1] ==
'/') {
276 }
else if (
str[1] ==
'?') {
282 buffer.get_attributes(attributes);
284 const std::string&
version = attributes.
get(
"version");
285 const std::string&
encoding = attributes.
get(
"encoding");
288 XMLNode::AttributeMap::const_iterator found =
290 if (found != attributes.end())
301 }
else if (
tag ==
"?xml-stylesheet") {
303 buffer.get_attributes(attributes);
306 stylesheet.
_title = attributes.
get(
"title");
307 stylesheet.
_media = attributes.
get(
"media");
317 }
else if (
str[1] ==
'!') {
324 while(!
buffer.has_CDEnd()) {
343 buffer.get_attributes(attributes);
347 if (
str[
b.length()-2] ==
'/')
363 }
else if (
c ==
'\r') {
418#ifdef XMLNODE_LOCATION
420XMLLocation XMLReaderBase::get_location()
const
422 return XMLLocation();
425std::string XMLLocation::str()
const
int strcmp(const char *String1, const char *String2)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
static const WCHAR version[]
GLdouble GLdouble GLdouble GLdouble q
GLboolean GLboolean GLboolean b
const char * get_xmlsym_end_utf8(const char *p)
XS_String DecodeXMLString(const std::string &str)
decode XML string literals
line buffer for XS-native parser
void get_attributes(XMLNode::AttributeMap &attributes) const
read attributes and values
const std::string & str(bool utf8)
XS_String get_tag() const
void parse(const char *str)
XML Error with message and location.
map of XML node attributes
XS_String get(const char *x, LPCXSSTR def=XS_EMPTY_STR) const
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
void read()
read XML stream into XML tree below _pos
virtual void EndElementHandler()
notifications about XML end tag
virtual void DefaultHandler(const std::string &s)
store content, white space and comments
std::string get_position() const
return current parser position as string
string class for TCHAR strings