81 return std::string(
s,
end-
s);
90static std::string
unescape(
const char*
s,
size_t l,
char b,
char e)
92 const char*
end =
s +
l;
104 return std::string(
s,
end-
s);
149 std::string comp(
path,
l);
160 const char*
p =
expr.c_str();
167 const char* at =
strchr(
p,
'@');
188 for(XMLNode::Children::const_iterator it=
node->_children.begin(); it!=
node->_children.end(); ++it)
199 for(XMLNode::Children::const_iterator it=
node->_children.begin(); it!=
node->_children.end(); ++it)
255 for(XPath::const_iterator it=xpath.begin(); it!=xpath.end(); ++it) {
269 for(XPath::const_iterator it=xpath.begin(); it!=xpath.end(); ++it) {
283 for(XPath::const_iterator it=xpath.begin(); it!=xpath.end(); ++it) {
290 if (!it->_attr_name.empty())
291 (*this)[it->_attr_name] = it->_attr_value;
307 for(XMLNode::Children::const_iterator it=
_children.begin(); it!=
_children.end(); ++it)
308 if (
elem.matches(**it,
n)) {
346 for(XMLNode::Children::const_iterator it=
_children.begin(); it!=
_children.end(); ++it)
347 if (
elem.matches(**it,
n)) {
399 *o++ =
'&'; *o++ =
'a'; *o++ =
'm'; *o++ =
'p'; *o++ =
';';
403 *o++ =
'&'; *o++ =
'l'; *o++ =
't'; *o++ =
';';
407 *o++ =
'&'; *o++ =
'g'; *o++ =
't'; *o++ =
';';
411 *o++ =
'&'; *o++ =
'q'; *o++ =
'u'; *o++ =
'o'; *o++ =
't'; *o++ =
';';
415 *o++ =
'&'; *o++ =
'a'; *o++ =
'p'; *o++ =
'o'; *o++ =
's'; *o++ =
';';
419 if ((
unsigned)*
p<0x20 && *
p!=
'\t' && *
p!=
'\r' && *
p!=
'\n') {
422 for(
const char*
q=
b; *
q; )
463 if ((
unsigned)*
p<0x20 && *
p!=
'\t' && *
p!=
'\r' && *
p!=
'\n')
472 return get_utf8(
out.str());
484 assign_utf8(str_utf8,
str.c_str(),
str.length());
544 (*it)->original_write_worker(
out);
570 (*it)->plain_write_worker(
out);
615 const char* leading =
_leading.c_str();
616 if (*leading ==
'\n') ++leading;
645 Children::const_iterator it =
_children.begin();
653 if (*end_leading ==
'\n') ++end_leading;
675 out <<
err._systemId <<
"(" <<
err._line <<
") [column " <<
err._column <<
"] : "
690 else if (!
isalnum(
c) &&
c!=
'.' &&
c!=
'-' &&
c!=
'_' &&
c!=
':')
714 if (*
p==
'"' || *
p==
'\'') {
718 while(*
p && *
p!=delim) ++
p;
727 if (*
p==
'"' || *
p==
'\'') {
731 while(*
p && *
p!=delim) ++
p;
745 out <<
" standalone=\"yes\"";
788 out <<
"<?xml-stylesheet"
789 " href=\"" <<
_href <<
"\""
790 " type=\"" <<
_type <<
"\"";
802 out <<
" alternate=\"yes\"";
811 std::ostringstream
out;
822 std::ostringstream
out;
824 for(const_iterator it=
begin(); it!=
end(); ++it)
825 out << *it << std::endl;
888#ifdef XMLNODE_LOCATION
892 node->_attributes = attributes;
937#if defined(XS_USE_XERCES) || defined(XS_USE_EXPAT)
941#if defined(XML_UNICODE) || defined(XS_USE_XERCES)
996 for(
size_t i=
_stack.size(); --
i>0; )
1006 for(AttrMap::const_iterator it=
entry._attributes.begin(); it!=
entry._attributes.end(); ++it)
1017 if (
entry._children || !
entry._content.empty()) {
1028 for(
size_t i=
_stack.size(); --
i>0; )
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strchr(const char *String, int ch)
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
static const WCHAR indent[]
static const WCHAR version[]
GLdouble GLdouble GLdouble GLdouble q
GLboolean GLboolean GLboolean b
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
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 i
static HRESULT get_location(HTMLInnerWindow *This, HTMLLocation **ret)
_Check_return_ _CRTIMP int __cdecl isalnum(_In_ int _C)
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
#define memcpy(s1, s2, n)
#define sprintf(buf, format,...)
static unsigned(__cdecl *hash_bstr)(bstr_t s)
std::ostringstream fast_ostringstream
static std::string unescape(const char *s, char b, char e)
remove escape characters from zero terminated string
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
void parse(const char *str)
void print(std::ostream &out) const
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)
map of XML node attributes
void assign(Children &other)
in memory representation of an XML node
const XMLNode * find_relative(const XPath &xpath) const
XPath find function (const)
XMLNode * create_relative(const XPath &xpath)
relative XPath create function
bool filter(const XPath &xpath, XMLNode &target) const
copy matching tree nodes using the given XPath filter expression
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
void plain_write_worker(std::ostream &out) const
print node without any white space
void original_write_worker(std::ostream &out) const
write node with children tree to output stream using original white space
int count(const XPath &xpath) const
count the nodes matching the given relative XPath expression
bool back()
go back to previous position
void add_down(XMLNode *child)
insert children when building tree
bool go(const XPath &xpath)
move to the position defined by xpath in XML tree
void go_to(XMLNode *child)
go to specified node
virtual void StartElementHandler(const XS_String &name, const XMLNode::AttributeMap &attributes)
notifications about XML start tag
enum XMLStorage::XMLReaderBase::@1561 _last_tag
virtual void XmlDeclHandler(const char *version, const char *encoding, int standalone)
store XML version and encoding into XML reader
virtual void EndElementHandler()
notifications about XML end tag
virtual void DefaultHandler(const std::string &s)
store content, white space and comments
container for XMLWriter state information
static XS_String s_empty_attr
void write_pre(StackEntry &entry)
void close_pre(StackEntry &entry)
void write_post(StackEntry &entry)
bool back()
go back to previous position
void create(const XS_String &name)
create node and move to it
void write_attributes(StackEntry &entry)
std::stack< StackEntry > _stack
const char * parse(const char *path)
XMLNode * find(XMLNode *node) const
const XMLNode * const_find(const XMLNode *node) const
bool matches(const XMLNode &node, int &n) const
void init(const char *path)
string class for TCHAR strings
void assign(const XS_String &s)
void go_to(const XMLNode *child)
go to specified node
bool go(const XPath &xpath)
move to the position defined by xpath in XML tree
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out