15#pragma convert("ISO8859-1")
27#ifdef LIBXML_ZLIB_ENABLED
40#ifdef LIBXML_HTML_ENABLED
43#ifdef LIBXML_DEBUG_ENABLED
94 msg =
"invalid hexadecimal character value\n";
97 msg =
"invalid decimal character value\n";
100 msg =
"unterminated entity reference %15s\n";
103 msg =
"string is not in UTF-8\n";
106 msg =
"unexpected error number\n";
120 {
't',
'e',
'x',
't',
'n',
'o',
'e',
'n',
'c', 0 };
124static int xmlCompressMode = 0;
125static int xmlCheckDTD = 1;
127#define UPDATE_LAST_CHILD_AND_PARENT(n) if ((n) != NULL) { \
128 xmlNodePtr ulccur = (n)->children; \
129 if (ulccur == NULL) { \
132 while (ulccur->next != NULL) { \
133 ulccur->parent = (n); \
134 ulccur = ulccur->next; \
136 ulccur->parent = (n); \
137 (n)->last = ulccur; \
140#define IS_STR_XML(str) ((str != NULL) && (str[0] == 'x') && \
141 (str[1] == 'm') && (str[2] == 'l') && (str[3] == 0))
154#ifdef LIBXML_TREE_ENABLED
228 lenn =
strlen((
char *) ncname);
243 ret[lenn + lenp + 1] = 0;
273#ifndef XML_XML_NAMESPACE
275 if ((
name[0] ==
'x') && (
name[1] ==
'm') &&
276 (
name[2] ==
'l') && (
name[3] ==
':'))
356#define CUR_SCHAR(s, l) xmlStringCurrentChar(NULL, s, &l)
358#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
382 if (((*
cur >=
'a') && (*
cur <=
'z')) || ((*
cur >=
'A') && (*
cur <=
'Z')) ||
387 while (((*
cur >=
'a') && (*
cur <=
'z')) ||
388 ((*
cur >=
'A') && (*
cur <=
'Z')) ||
389 ((*
cur >=
'0') && (*
cur <=
'9')) ||
390 (*
cur ==
'_') || (*
cur ==
'-') || (*
cur ==
'.'))
432#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
455 if (((*
cur >=
'a') && (*
cur <=
'z')) || ((*
cur >=
'A') && (*
cur <=
'Z')) ||
460 while (((*
cur >=
'a') && (*
cur <=
'z')) ||
461 ((*
cur >=
'A') && (*
cur <=
'Z')) ||
462 ((*
cur >=
'0') && (*
cur <=
'9')) ||
463 (*
cur ==
'_') || (*
cur ==
'-') || (*
cur ==
'.'))
467 if (((*
cur >=
'a') && (*
cur <=
'z')) ||
468 ((*
cur >=
'A') && (*
cur <=
'Z')) ||
473 while (((*
cur >=
'a') && (*
cur <=
'z')) ||
474 ((*
cur >=
'A') && (*
cur <=
'Z')) ||
475 ((*
cur >=
'0') && (*
cur <=
'9')) ||
476 (*
cur ==
'_') || (*
cur ==
'-') || (*
cur ==
'.'))
553 if (((*
cur >=
'a') && (*
cur <=
'z')) || ((*
cur >=
'A') && (*
cur <=
'Z')) ||
554 (*
cur ==
'_') || (*
cur ==
':'))
558 while (((*
cur >=
'a') && (*
cur <=
'z')) ||
559 ((*
cur >=
'A') && (*
cur <=
'Z')) ||
560 ((*
cur >=
'0') && (*
cur <=
'9')) ||
561 (*
cur ==
'_') || (*
cur ==
'-') || (*
cur ==
'.') || (*
cur ==
':'))
622 if (((*
cur >=
'a') && (*
cur <=
'z')) ||
623 ((*
cur >=
'A') && (*
cur <=
'Z')) ||
624 ((*
cur >=
'0') && (*
cur <=
'9')) ||
625 (*
cur ==
'_') || (*
cur ==
'-') || (*
cur ==
'.') || (*
cur ==
':'))
629 while (((*
cur >=
'a') && (*
cur <=
'z')) ||
630 ((*
cur >=
'A') && (*
cur <=
'Z')) ||
631 ((*
cur >=
'0') && (*
cur <=
'9')) ||
632 (*
cur ==
'_') || (*
cur ==
'-') || (*
cur ==
'.') || (*
cur ==
':'))
808 "xmlSetNs: node == NULL\n");
828 "xmlFreeNs : ns == NULL\n");
849 "xmlFreeNsList : ns == NULL\n");
880 "xmlNewDtd(%s): document %s already have a DTD %s\n",
900 if (ExternalID !=
NULL)
902 if (SystemID !=
NULL)
955 "xmlCreateIntSubset(): document %s already have an internal subset\n",
980 if (ExternalID !=
NULL) {
990 if (SystemID !=
NULL) {
1053#define DICT_FREE(str) \
1054 if ((str) && ((!dict) || \
1055 (xmlDictOwns(dict, (const xmlChar *)(str)) == 0))) \
1056 xmlFree((char *)(str));
1066#define DICT_COPY(str, cpy) \
1069 if (xmlDictOwns(dict, (const xmlChar *)(str))) \
1070 cpy = (xmlChar *) (str); \
1072 cpy = (xmlChar *) xmlDictLookup((dict), (const xmlChar *)(str), -1); \
1074 cpy = xmlStrdup((const xmlChar *)(str)); }
1083#define DICT_CONST_COPY(str, cpy) \
1086 if (xmlDictOwns(dict, (const xmlChar *)(str))) \
1087 cpy = (const xmlChar *) (str); \
1089 cpy = xmlDictLookup((dict), (const xmlChar *)(str), -1); \
1091 cpy = (const xmlChar *) xmlStrdup((const xmlChar *)(str)); }
1182 cur->standalone = -1;
1183 cur->compression = -1;
1185 cur->parseFlags = 0;
1213 "xmlFreeDoc : document == NULL\n");
1217#ifdef LIBXML_DEBUG_RUNTIME
1218#ifdef LIBXML_DEBUG_ENABLED
1235 extSubset =
cur->extSubset;
1236 intSubset =
cur->intSubset;
1237 if (intSubset == extSubset)
1239 if (extSubset !=
NULL) {
1244 if (intSubset !=
NULL) {
1291 if (
cur[0] ==
'&') {
1303 if ((
cur + 2 <
end) && (
cur[1] ==
'#') && (
cur[2] ==
'x')) {
1309 while (tmp !=
';') {
1320 if ((tmp >=
'0') && (tmp <=
'9'))
1321 charval = charval * 16 + (tmp -
'0');
1322 else if ((tmp >=
'a') && (tmp <=
'f'))
1323 charval = charval * 16 + (tmp -
'a') + 10;
1324 else if ((tmp >=
'A') && (tmp <=
'F'))
1325 charval = charval * 16 + (tmp -
'A') + 10;
1341 }
else if ((
cur + 1 <
end) && (
cur[1] ==
'#')) {
1347 while (tmp !=
';') {
1349 if ((tmp >=
'0') && (tmp <=
'9'))
1350 charval = charval * 10 + (tmp -
'0');
1384 if ((ent !=
NULL) &&
1512 if (
cur[0] ==
'&') {
1524 if ((
cur[1] ==
'#') && (
cur[2] ==
'x')) {
1527 while (tmp !=
';') {
1529 if ((tmp >=
'0') && (tmp <=
'9'))
1530 charval = charval * 16 + (tmp -
'0');
1531 else if ((tmp >=
'a') && (tmp <=
'f'))
1532 charval = charval * 16 + (tmp -
'a') + 10;
1533 else if ((tmp >=
'A') && (tmp <=
'F'))
1534 charval = charval * 16 + (tmp -
'A') + 10;
1547 }
else if (
cur[1] ==
'#') {
1550 while (tmp !=
';') {
1552 if ((tmp >=
'0') && (tmp <=
'9'))
1553 charval = charval * 10 + (tmp -
'0');
1572 while ((*
cur != 0) && (*
cur !=
';'))
cur++;
1584 if ((ent !=
NULL) &&
1763 "xmlGetNodeListString : invalid node type %d\n",
1772#ifdef LIBXML_TREE_ENABLED
1823 xmlNodeListGetRawString(doc, ent->
children, 1);
1846 "xmlGetNodeListString : invalid node type %d\n",
1865 if ((eatname == 1) &&
1877 if ((eatname == 1) &&
1907 tmp =
cur->children;
1908 while (tmp !=
NULL) {
1941#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
1942 defined(LIBXML_SCHEMAS_ENABLED)
1958 "xmlNewProp : name == NULL\n");
1984 "xmlNewNsProp : name == NULL\n");
2009 "xmlNewNsPropEatName : name == NULL\n");
2038 "xmlNewDocProp : name == NULL\n");
2065 tmp =
cur->children;
2066 while (tmp !=
NULL) {
2136 "xmlRemoveProp : cur == NULL\n");
2143 "xmlRemoveProp : cur->parent == NULL\n");
2147 tmp =
cur->parent->properties;
2149 cur->parent->properties =
cur->next;
2155 while (tmp !=
NULL) {
2159 tmp->
next->prev = tmp;
2167 "xmlRemoveProp : attribute not owned by its node\n");
2188 "xmlNewPI : name == NULL\n");
2253 "xmlNewNode : name == NULL\n");
2297 "xmlNewNode : name == NULL\n");
2396#ifdef LIBXML_TREE_ENABLED
2490#ifdef LIBXML_TREE_ENABLED
2518 "xmlNewTextChild : parent == NULL\n");
2526 "xmlNewTextChild : name == NULL\n");
2599 if (
name[0] ==
'&') {
2643 if (
name[0] ==
'&') {
2828 const xmlChar *newValue = oldValue;
2830 int oldDictOwnsOldValue = oldDict && (
xmlDictOwns(oldDict, oldValue) == 1);
2831 if (oldDictOwnsOldValue) {
2854 if (
tree->doc != doc) {
2859 prop =
tree->properties;
2860 while (prop !=
NULL) {
2865 if (prop->
doc != doc) {
2867 prop->
name = _copyStringForNewDictIfNeeded(oldPropDict, newDict, prop->
name);
2895 }
else if (
tree->children !=
NULL) {
2899 tree->name = _copyStringForNewDictIfNeeded(oldTreeDict, newDict,
tree->name);
2900 tree->content = (
xmlChar *)_copyStringForNewDictIfNeeded(oldTreeDict,
NULL,
tree->content);
2921 if (
cur->doc != doc)
2927#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
2953 "xmlNewChild : parent == NULL\n");
2961 "xmlNewChild : name == NULL\n");
3037 if (prop->
doc !=
cur->doc) {
3046 prop->
next->prev = prop;
3081 "xmlAddNextSibling : cur == NULL\n");
3088 "xmlAddNextSibling : elem == NULL\n");
3096 "xmlAddNextSibling : cur == elem\n");
3110 (
cur->name ==
cur->next->name)) {
3138#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
3139 defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
3161 "xmlAddPrevSibling : cur == NULL\n");
3168 "xmlAddPrevSibling : elem == NULL\n");
3176 "xmlAddPrevSibling : cur == elem\n");
3195 (
cur->name ==
cur->prev->name)) {
3201 return xmlAddPropSibling(
cur->prev,
cur,
elem);
3241 "xmlAddSibling : cur == NULL\n");
3249 "xmlAddSibling : elem == NULL\n");
3257 "xmlAddSibling : cur == elem\n");
3267 (
cur->parent->children !=
NULL) &&
3268 (
cur->parent->last !=
NULL) &&
3269 (
cur->parent->last->next ==
NULL)) {
3319 "xmlAddChildList : parent == NULL\n");
3327 "xmlAddChildList : child == NULL\n");
3336 "Elements moved to a different document\n");
3411 "xmlAddChild : parent == NULL\n");
3419 "xmlAddChild : child == NULL\n");
3427 "xmlAddChild : parent == cur\n");
3502 lastattr = lastattr->
next;
3533 "xmlGetLastChild : parent == NULL\n");
3540#ifdef LIBXML_TREE_ENABLED
3559 unsigned long ret = 0;
3671 switch (
node->type) {
3710 switch (
node->type) {
3757 while ((
cur->children !=
NULL) &&
3856 if ((
cur->children !=
NULL) &&
3867 }
else if ((
cur->content !=
NULL) &&
3901 "xmlUnlinkNode : node == NULL\n");
3954 cur->next->prev =
cur->prev;
3956 cur->prev->next =
cur->next;
3960#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
3981 "xmlReplaceNode : old == NULL or without parent\n");
3995 "xmlReplaceNode : Trying to replace attribute node with other node type\n");
4002 "xmlReplaceNode : Trying to replace a non-attribute node with attribute node\n");
4020 if (
cur->parent->children == old)
4021 cur->parent->children =
cur;
4022 if (
cur->parent->last == old)
4051 switch (
cur->type) {
4058 "xmlCopyNamespace: invalid type %d\n",
cur->type);
4103 else if (doc !=
NULL)
4107 else if (
cur->children !=
NULL)
4165 tmp =
ret->children;
4166 while (tmp !=
NULL) {
4263 switch (
node->type) {
4282#ifdef LIBXML_TREE_ENABLED
4390 if ((doc ==
NULL) || (
node->doc != doc)) {
4399 ret->children =
node->children;
4401 ret->last =
ret->children;
4402 }
else if ((
node->children !=
NULL) && (extended != 2)) {
4462#ifdef LIBXML_TREE_ENABLED
4486 }
else if (
p !=
q) {
4532 ret = xmlStaticCopyNode(
node, doc,
NULL, extended);
4564#if defined(LIBXML_TREE_ENABLED)
4582 ret->entities = (
void *) xmlCopyEntitiesTable(
4585 ret->notations = (
void *) xmlCopyNotationTable(
4588 ret->elements = (
void *) xmlCopyElementTable(
4591 ret->attributes = (
void *) xmlCopyAttributeTable(
4594 ret->pentities = (
void *) xmlCopyEntitiesTable(
4603 switch (tmp->
etype) {
4612 xmlGetParameterEntityFromDtd(
ret, tmp->
name);
4651#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
4663xmlCopyDoc(
xmlDocPtr doc,
int recursive) {
4679 if (!recursive)
return(
ret);
4683#ifdef LIBXML_TREE_ENABLED
4691 ret->intSubset->parent =
ret;
4702 tmp =
ret->children;
4703 while (tmp !=
NULL) {
4743 if (
node->line == 65535) {
4782 return(xmlGetLineNoInternal(
node, 0));
4785#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
4805 int occur = 0,
generic;
4838 name = (
const char *)
cur->name;
4840 if (
cur->ns->prefix !=
NULL) {
4841 snprintf(nametemp,
sizeof(nametemp) - 1,
"%s:%s",
4842 (
char *)
cur->ns->prefix, (
char *)
cur->name);
4843 nametemp[
sizeof(nametemp) - 1] = 0;
4861 while (tmp !=
NULL) {
4865 ((tmp->
ns ==
cur->ns) ||
4873 while (tmp !=
NULL && occur == 0) {
4877 ((tmp->
ns ==
cur->ns) ||
4896 while (tmp !=
NULL) {
4903 while (tmp !=
NULL && occur == 0) {
4922 while (tmp !=
NULL) {
4934 while (tmp !=
NULL) {
4947 snprintf(nametemp,
sizeof(nametemp) - 1,
4948 "processing-instruction('%s')", (
char *)
cur->name);
4949 nametemp[
sizeof(nametemp) - 1] = 0;
4958 while (tmp !=
NULL) {
4966 while (tmp !=
NULL && occur == 0) {
4982 snprintf(nametemp,
sizeof(nametemp) - 1,
"%s:%s",
4983 (
char *)
cur->ns->prefix, (
char *)
cur->name);
4985 snprintf(nametemp,
sizeof(nametemp) - 1,
"%s",
4987 nametemp[
sizeof(nametemp) - 1] = 0;
5057#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
5080 while (old !=
NULL) {
5093 xmlReplaceNode(old,
root);
5099#if defined(LIBXML_TREE_ENABLED)
5170#ifdef LIBXML_TREE_ENABLED
5256#ifdef LIBXML_TREE_ENABLED
5316#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
5405 if (doc ==
NULL) doc =
cur->doc;
5436 if (oldbase !=
NULL) {
5438 if (newbase !=
NULL) {
5459 if (oldbase ==
NULL)
5513 switch (
cur->type) {
5522 while (tmp !=
NULL) {
5523 switch (tmp->
type) {
5564 }
while (tmp !=
NULL);
5572 while (tmp !=
NULL) {
5652 switch (
cur->type) {
5757 "xmlNodeSetContent : node == NULL\n");
5761 switch (
cur->type) {
5813#ifdef LIBXML_TREE_ENABLED
5830 "xmlNodeSetContentLen : node == NULL\n");
5834 switch (
cur->type) {
5900 "xmlNodeAddContentLen : node == NULL\n");
5904 if (
len <= 0)
return;
5905 switch (
cur->type) {
5912 if (newNode !=
NULL) {
5974 "xmlNodeAddContent : node == NULL\n");
6005#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
6042 for (
i = 0;
i < nbns;
i++) {
6043 if ((
cur->prefix ==
ret[
i]->prefix) ||
6048 if (nbns >= maxns) {
6086 return (doc->
oldNs);
6092 "allocating the XML namespace");
6127 if ((nameSpace !=
NULL) &&
6157 return(xmlTreeEnsureXMLDecl(doc));
6169 if ((
cur->prefix ==
NULL) && (nameSpace ==
NULL) &&
6172 if ((
cur->prefix !=
NULL) && (nameSpace !=
NULL) &&
6181 if ((
cur->prefix ==
NULL) && (nameSpace ==
NULL) &&
6184 if ((
cur->prefix !=
NULL) && (nameSpace !=
NULL) &&
6221 while (tst !=
NULL) {
6234 if (
node != ancestor)
6290 return(xmlTreeEnsureXMLDecl(doc));
6306 (xmlNsInScope(doc, orig,
node,
cur->prefix) == 1))
6317 (xmlNsInScope(doc, orig,
node,
cur->prefix) == 1))
6350 "xmlNewReconciledNs : tree == NULL\n");
6357 "xmlNewReconciledNs : ns == NULL\n");
6378 while (def !=
NULL) {
6395#ifdef LIBXML_TREE_ENABLED
6424 if (
node->doc != doc)
return(-1);
6433 if (sizeCache == 0) {
6437 if (oldNs ==
NULL) {
6443 if (newNs ==
NULL) {
6449 for (
i = 0;
i < nbCache;
i++) {
6450 if (oldNs[
i] ==
node->ns) {
6451 node->ns = newNs[
i];
6464 if (sizeCache <= nbCache) {
6468 if (oldNs ==
NULL) {
6475 if (newNs ==
NULL) {
6482 oldNs[nbCache++] =
node->ns;
6497 if (sizeCache == 0) {
6501 if (oldNs ==
NULL) {
6507 if (newNs ==
NULL) {
6513 for (
i = 0;
i < nbCache;
i++) {
6514 if (oldNs[
i] ==
attr->ns) {
6515 attr->ns = newNs[
i];
6528 if (sizeCache <= nbCache) {
6532 if (oldNs ==
NULL) {
6539 if (newNs ==
NULL) {
6546 oldNs[nbCache++] =
attr->ns;
6594 const xmlChar *nsName,
int useDTD)
6605 prop =
node->properties;
6606 if (nsName ==
NULL) {
6615 }
while (prop !=
NULL);
6622 ((prop->
ns->
href == nsName) ||
6628 }
while (prop !=
NULL);
6632#ifdef LIBXML_TREE_ENABLED
6683 nsList = xmlGetNsList(
node->doc,
node);
6684 if (nsList ==
NULL) {
6693 name, (*cur)->prefix);
6698 name, (*cur)->prefix);
6775 prop =
node->properties;
6776 while (prop !=
NULL) {
6782 if (!xmlCheckDTD)
return(
NULL);
6823 return(xmlGetPropNodeInternal(
node,
name, nameSpace, xmlCheckDTD));
6871 prop = xmlGetPropNodeInternal(
node,
name,
NULL, xmlCheckDTD);
6896 prop = xmlGetPropNodeInternal(
node,
name, nameSpace, xmlCheckDTD);
6902#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
6946#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
6973 if (nqname !=
NULL) {
7025 while (tmp !=
NULL) {
7076 if (
node->content ==
NULL)
return(1);
7107 "xmlTextConcat: node is not text nor CDATA\n");
7155 ret->content[0] = 0;
7188 ret->content[0] = 0;
7268 "xmlBufferSetAllocationScheme: buf == NULL\n");
7293 "xmlBufferFree: buf == NULL\n");
7301 }
else if ((
buf->content !=
NULL) &&
7317 if (
buf->content ==
NULL)
return;
7323 size_t start_buf =
buf->content -
buf->contentIO;
7325 buf->size += start_buf;
7326 buf->content =
buf->contentIO;
7327 buf->content[0] = 0;
7329 buf->content[0] = 0;
7345 if (
len == 0)
return(0);
7346 if (
len >
buf->use)
return(-1);
7363 size_t start_buf =
buf->content -
buf->contentIO;
7364 if (start_buf >=
buf->size) {
7366 buf->content =
buf->contentIO;
7367 buf->content[
buf->use] = 0;
7368 buf->size += start_buf;
7373 buf->content[
buf->use] = 0;
7395 if (len < buf->
size -
buf->use)
7402 if (
buf->size > (
size_t)
len) {
7410 size_t start_buf =
buf->content -
buf->contentIO;
7413 if (newbuf ==
NULL) {
7417 buf->contentIO = newbuf;
7418 buf->content = newbuf + start_buf;
7421 if (newbuf ==
NULL) {
7425 buf->content = newbuf;
7428 return(
buf->size -
buf->use - 1);
7446 "xmlBufferDump: buf == NULL\n");
7453 "xmlBufferDump: buf->content == NULL\n");
7478 return buf->content;
7511 unsigned int newSize;
7521 if (size < buf->
size)
7530 switch (
buf->alloc){
7537 newSize =
buf->size;
7538 while (
size > newSize) {
7553 newSize =
buf->size;
7554 while (
size > newSize) {
7570 start_buf =
buf->content -
buf->contentIO;
7572 if (start_buf > newSize) {
7575 buf->content =
buf->contentIO;
7576 buf->content[
buf->use] = 0;
7577 buf->size += start_buf;
7580 if (rebuf ==
NULL) {
7584 buf->contentIO = rebuf;
7585 buf->content = rebuf + start_buf;
7591 rebuf[
buf->use] = 0;
7592 }
else if (
buf->size -
buf->use < 100) {
7601 if (rebuf !=
NULL) {
7604 rebuf[
buf->use] = 0;
7607 if (rebuf ==
NULL) {
7611 buf->content = rebuf;
7613 buf->size = newSize;
7632 unsigned int needSize;
7641 "xmlBufferAdd: len < 0\n");
7645 if (
len == 0)
return 0;
7650 if (
len < 0)
return -1;
7651 if (
len == 0)
return 0;
7654 if ((
unsigned)
len >=
buf->size -
buf->use) {
7659 needSize =
buf->use +
len + 1;
7668 buf->content[
buf->use] = 0;
7686 unsigned int needSize;
7694 "xmlBufferAddHead: str == NULL\n");
7701 "xmlBufferAddHead: len < 0\n");
7705 if (
len == 0)
return 0;
7710 if (
len <= 0)
return -1;
7713 size_t start_buf =
buf->content -
buf->contentIO;
7715 if (start_buf > (
unsigned int)
len) {
7723 buf->content[
buf->use] = 0;
7728 if ((
unsigned)
len >=
buf->size -
buf->use) {
7733 needSize =
buf->use +
len + 1;
7743 buf->content[
buf->use] = 0;
7833 "xmlBufferWriteQuotedString: string contains quote and double-quotes !\n");
7875 if (doc ==
NULL)
return(-1);
7889 if (doc ==
NULL)
return;
7904 return (xmlCompressMode);
7916 if (
mode < 0) xmlCompressMode = 0;
7917 else if (
mode > 9) xmlCompressMode = 9;
7918 else xmlCompressMode =
mode;
7921#define XML_TREE_NSMAP_PARENT -1
7922#define XML_TREE_NSMAP_XML -2
7923#define XML_TREE_NSMAP_DOC -3
7924#define XML_TREE_NSMAP_CUSTOM -4
7926typedef struct xmlNsMapItem *xmlNsMapItemPtr;
7927struct xmlNsMapItem {
7928 xmlNsMapItemPtr
next;
7929 xmlNsMapItemPtr prev;
7944typedef struct xmlNsMap *xmlNsMapPtr;
7946 xmlNsMapItemPtr
first;
7947 xmlNsMapItemPtr
last;
7948 xmlNsMapItemPtr
pool;
7951#define XML_NSMAP_NOTEMPTY(m) (((m) != NULL) && ((m)->first != NULL))
7952#define XML_NSMAP_FOREACH(m, i) for (i = (m)->first; i != NULL; i = (i)->next)
7953#define XML_NSMAP_POP(m, i) \
7955 (m)->last = (i)->prev; \
7956 if ((m)->last == NULL) \
7957 (m)->first = NULL; \
7959 (m)->last->next = NULL; \
7960 (i)->next = (m)->pool; \
7970xmlDOMWrapNsMapFree(xmlNsMapPtr nsmap)
7972 xmlNsMapItemPtr
cur, tmp;
8000static xmlNsMapItemPtr
8001xmlDOMWrapNsMapAddItem(xmlNsMapPtr *nsmap,
int position,
8004 xmlNsMapItemPtr
ret;
8009 if ((position != -1) && (position != 0))
8017 map = (xmlNsMapPtr)
xmlMalloc(
sizeof(
struct xmlNsMap));
8022 memset(
map, 0,
sizeof(
struct xmlNsMap));
8032 memset(
ret, 0,
sizeof(
struct xmlNsMapItem));
8037 ret = (xmlNsMapItemPtr)
xmlMalloc(
sizeof(
struct xmlNsMapItem));
8042 memset(
ret, 0,
sizeof(
struct xmlNsMapItem));
8051 }
else if (position == -1) {
8058 }
else if (position == 0) {
8069 ret->shadowDepth = -1;
8095 ns = xmlTreeEnsureXMLDecl(doc);
8200xmlDOMWrapNSNormGatherInScopeNs(xmlNsMapPtr *
map,
8237 mi = xmlDOMWrapNsMapAddItem(
map, 0,
NULL,
8242 mi->shadowDepth = 0;
8256#define XML_TREE_ADOPT_STR(str) \
8257 if (adoptStr && (str != NULL)) { \
8258 if (destDoc->dict) { \
8259 const xmlChar *old = str; \
8260 str = xmlDictLookup(destDoc->dict, str, -1); \
8261 if ((sourceDoc == NULL) || (sourceDoc->dict == NULL) || \
8262 (!xmlDictOwns(sourceDoc->dict, old))) \
8263 xmlFree((char *)old); \
8264 } else if ((sourceDoc) && (sourceDoc->dict) && \
8265 xmlDictOwns(sourceDoc->dict, str)) { \
8266 str = BAD_CAST xmlStrdup(str); \
8274#define XML_TREE_ADOPT_STR_2(str) \
8275 if (adoptStr && (str != NULL) && (sourceDoc != NULL) && \
8276 (sourceDoc->dict != NULL) && \
8277 xmlDictOwns(sourceDoc->dict, cur->content)) { \
8278 if (destDoc->dict) \
8279 cur->content = (xmlChar *) \
8280 xmlDictLookup(destDoc->dict, cur->content, -1); \
8282 cur->content = xmlStrdup(BAD_CAST cur->content); \
8313 (*list)[2 * (*number)] = oldNs;
8314 (*list)[2 * (*number) +1] = newNs;
8341 int sizeList, nbList,
i,
j;
8351 switch (
node->type) {
8370 switch (
node->type) {
8375 if (xmlDOMWrapNSNormAddNsMapItem2(&
list, &sizeList,
8376 &nbList,
ns,
ns) == -1)
8377 goto internal_error;
8388 for (
i = 0,
j = 0;
i < nbList;
i++,
j += 2) {
8404 ns = xmlDOMWrapStoreNs(doc,
node->ns->href,
8407 goto internal_error;
8413 if (xmlDOMWrapNSNormAddNsMapItem2(&
list, &sizeList,
8414 &nbList,
node->ns,
ns) == -1)
8415 goto internal_error;
8477 if ((doc ==
NULL) || (nsName ==
NULL) || (retNs ==
NULL))
8484 *retNs = xmlTreeEnsureXMLDecl(doc);
8501 prevns = prev->
nsDef;
8512 prevns = prevns->
next;
8513 }
while (prevns !=
NULL);
8520 if ((nsName ==
ns->href) ||
8586 *retNs = xmlTreeEnsureXMLDecl(doc);
8637xmlDOMWrapNSNormDeclareNsForced(
xmlDocPtr doc,
8660 (xmlTreeNSListLookupByPrefix(
elem->nsDef, pref) !=
NULL))
8661 goto ns_next_prefix;
8662 if (checkShadow &&
elem->parent &&
8667 if (xmlSearchNsByPrefixStrict(doc,
elem->parent, pref,
NULL) == 1)
8668 goto ns_next_prefix;
8716xmlDOMWrapNSNormAcquireNormalizedNs(
xmlDocPtr doc,
8740 *retNs = xmlTreeEnsureXMLDecl(doc);
8750 (! (ancestorsOnly && (
elem ==
NULL))))
8765 (
mi->shadowDepth == -1) &&
8767 ((
mi->newNs->href !=
NULL) &&
8768 (
mi->newNs->href[0] != 0)) &&
8770 ((! prefixed) || (
mi->newNs->prefix !=
NULL)) &&
8772 ((
mi->newNs->href ==
ns->href) ||
8790 tmpns = xmlDOMWrapStoreNs(doc,
ns->href,
ns->
prefix);
8796 if (xmlDOMWrapNsMapAddItem(nsMap, -1,
ns,
8805 tmpns = xmlDOMWrapNSNormDeclareNsForced(doc,
elem,
ns->href,
8810 if (*nsMap !=
NULL) {
8816 (
mi->shadowDepth == -1) &&
8827 if (xmlDOMWrapNsMapAddItem(nsMap, -1,
ns, tmpns,
depth) ==
NULL) {
8837 XML_DOM_RECONNS_REMOVEREDUND = 1<<0
8838} xmlDOMReconcileNSOptions;
8862 int depth = -1, adoptns = 0, parnsdone = 0;
8866 xmlNsMapPtr nsMap =
NULL;
8869 int ancestorsOnly = 0;
8870 int optRemoveRedundantNS =
8871 ((xmlDOMReconcileNSOptions)
options & XML_DOM_RECONNS_REMOVEREDUND) ? 1 : 0;
8873 int sizeRedund = 0, nbRedund = 0,
ret,
i,
j;
8882 switch (
cur->type) {
8895 if ((
elem->parent) &&
8900 if (xmlDOMWrapNSNormGatherInScopeNs(&nsMap,
8901 elem->parent) == -1)
8902 goto internal_error;
8913 (
mi->shadowDepth == -1) &&
8916 ((
ns->href ==
mi->newNs->href) ||
8923 if (xmlDOMWrapNSNormAddNsMapItem2(&listRedund,
8924 &sizeRedund, &nbRedund,
ns,
mi->newNs) == -1)
8925 goto internal_error;
8932 cur->nsDef =
ns->next;
8950 (
mi->shadowDepth == -1) &&
8961 if (xmlDOMWrapNsMapAddItem(&nsMap, -1,
ns,
ns,
8963 goto internal_error;
8979 if ((
elem->parent) &&
8981 if (xmlDOMWrapNSNormGatherInScopeNs(&nsMap,
8982 elem->parent) == -1)
8983 goto internal_error;
8991 for (
i = 0,
j = 0;
i < nbRedund;
i++,
j += 2) {
8992 if (
cur->ns == listRedund[
j]) {
8993 cur->ns = listRedund[++
j];
9006 if ((
mi->shadowDepth == -1) &&
9007 (
cur->ns ==
mi->oldNs)) {
9009 cur->ns =
mi->newNs;
9017 if (xmlDOMWrapNSNormAcquireNormalizedNs(doc, curElem,
9022 goto internal_error;
9055 while ((nsMap->last !=
NULL) &&
9056 (nsMap->last->depth >=
depth))
9065 mi->shadowDepth = -1;
9088 for (
i = 0,
j = 0;
i < nbRedund;
i++,
j += 2) {
9094 xmlDOMWrapNsMapFree(nsMap);
9130 xmlNsMapPtr nsMap =
NULL;
9133 int depth = -1, adoptStr = 1;
9137 int ancestorsOnly = 0;
9142 if ((sourceDoc !=
NULL) &&
9143 (sourceDoc->
dict == destDoc->
dict))
9159 if ((destParent ==
NULL) ||
9168 goto internal_error;
9174 if (
cur->doc != sourceDoc) {
9194 switch (
cur->type) {
9219 if (xmlDOMWrapNSNormGatherInScopeNs(&nsMap,
9221 goto internal_error;
9236 (
mi->shadowDepth == -1) &&
9239 mi->newNs->prefix))) {
9248 if (xmlDOMWrapNsMapAddItem(&nsMap, -1,
9250 goto internal_error;
9260 if (xmlDOMWrapNSNormGatherInScopeNs(&nsMap,
9262 goto internal_error;
9273 if ((
mi->shadowDepth == -1) &&
9274 (
cur->ns ==
mi->oldNs)) {
9276 cur->ns =
mi->newNs;
9289 cur->ns->href,
cur->ns->prefix);
9294 if (xmlDOMWrapNsMapAddItem(&nsMap, -1,
9296 goto internal_error;
9302 if (xmlDOMWrapNSNormAcquireNormalizedNs(destDoc,
9304 destParent ? curElem :
NULL,
9310 goto internal_error;
9326 if (
cur->properties !=
NULL) {
9337 if ((sourceDoc !=
NULL) &&
9361 if ((destDoc->intSubset) || (destDoc->extSubset)) {
9381 goto internal_error;
9405 while ((nsMap->last !=
NULL) &&
9406 (nsMap->last->depth >=
depth))
9415 mi->shadowDepth = -1;
9423 (
cur->parent->children !=
NULL))
9425 cur =
cur->parent->children;
9441 if (nsMap !=
NULL) {
9448 nsMap->last->
next = nsMap->pool;
9449 nsMap->pool = nsMap->first;
9450 nsMap->first =
NULL;
9453 xmlDOMWrapNsMapFree(nsMap);
9500 xmlNsMapPtr nsMap =
NULL;
9512 int ancestorsOnly = 0;
9528 (
node->doc != sourceDoc)) {
9534 if (sourceDoc ==
NULL)
9535 sourceDoc =
node->doc;
9536 if (sourceDoc ==
NULL)
9539 dict = destDoc->
dict;
9553 if (
cur->doc != sourceDoc) {
9559 goto internal_error;
9564 switch (
cur->type) {
9570 goto internal_error;
9584 if (clone ==
NULL) {
9586 goto internal_error;
9592 if (resultClone !=
NULL) {
9593 clone->parent = parentClone;
9595 prevClone->next = clone;
9596 clone->prev = prevClone;
9598 parentClone->children = clone;
9600 resultClone = clone;
9609 if (clone ==
NULL) {
9611 goto internal_error;
9618 if (resultClone !=
NULL) {
9619 clone->parent = parentClone;
9621 prevClone->next = clone;
9622 clone->prev = prevClone;
9624 parentClone->properties = (
xmlAttrPtr) clone;
9626 resultClone = clone;
9632 goto internal_error;
9636 clone->doc = destDoc;
9656 switch (
cur->type) {
9671 if (destParent && (ctxt ==
NULL)) {
9675 if (xmlDOMWrapNSNormGatherInScopeNs(&nsMap,
9677 goto internal_error;
9684 cloneNsDefSlot = &(clone->nsDef);
9690 if (cloneNs ==
NULL) {
9692 "allocating namespace");
9703 *cloneNsDefSlot = cloneNs;
9704 cloneNsDefSlot = &(cloneNs->
next);
9711 if ((ctxt ==
NULL) ||
9720 (
mi->shadowDepth == -1) &&
9723 mi->newNs->prefix))) {
9735 if (xmlDOMWrapNsMapAddItem(&nsMap, -1,
9737 goto internal_error;
9758 if (sourceDoc != destDoc) {
9766 clone->content = ent->
content;
9776 clone->content =
cur->content;
9777 clone->children =
cur->children;
9778 clone->last =
cur->last;
9788 goto internal_error;
9792 goto end_ns_reference;
9801 if (destParent && (ctxt ==
NULL)) {
9802 if (xmlDOMWrapNSNormGatherInScopeNs(&nsMap, destParent) == -1)
9803 goto internal_error;
9815 if ((
mi->shadowDepth == -1) &&
9816 (
cur->ns ==
mi->oldNs)) {
9820 clone->ns =
mi->newNs;
9821 goto end_ns_reference;
9833 cur->ns->href,
cur->ns->prefix);
9837 if (xmlDOMWrapNsMapAddItem(&nsMap, -1,
9839 goto internal_error;
9845 if (xmlDOMWrapNSNormAcquireNormalizedNs(destDoc,
9847 destParent ? curElem :
NULL,
9854 goto internal_error;
9866 (clone->parent !=
NULL))
9873 if (idVal !=
NULL) {
9877 goto internal_error;
9892 parentClone = clone;
9903 parentClone = clone;
9926 while ((nsMap->last !=
NULL) &&
9927 (nsMap->last->depth >=
depth))
9936 mi->shadowDepth = -1;
9949 clone->
parent->last = clone;
9952 parentClone = clone->
parent;
9961 parentClone = clone->
parent;
9978 if (nsMap !=
NULL) {
9985 nsMap->last->
next = nsMap->pool;
9986 nsMap->pool = nsMap->first;
9987 nsMap->first =
NULL;
9990 xmlDOMWrapNsMapFree(nsMap);
9996 *resNode = resultClone;
10030 attr->doc = destDoc;
10034 if (ctxt !=
NULL) {
10039 ns = xmlTreeEnsureXMLDecl(destDoc);
10040 }
else if (destParent ==
NULL) {
10044 ns = xmlDOMWrapStoreNs(destDoc,
attr->ns->href,
attr->ns->prefix);
10049 if (xmlSearchNsByNamespaceStrict(destDoc, destParent,
attr->ns->href,
10051 goto internal_error;
10053 ns = xmlDOMWrapNSNormDeclareNsForced(destDoc, destParent,
10054 attr->ns->href,
attr->ns->prefix, 1);
10058 goto internal_error;
10072 goto internal_error;
10074 cur->doc = destDoc;
10075 switch (
cur->type) {
10087 if ((destDoc->intSubset) || (destDoc->extSubset)) {
10158 (destDoc ==
NULL) ||
10159 ((destParent !=
NULL) && (destParent->
doc != destDoc)))
10165 (
node->doc != sourceDoc)) {
10171 if (sourceDoc ==
NULL)
10172 sourceDoc =
node->doc;
10173 if (sourceDoc == destDoc)
10175 switch (
node->type) {
10193 if ((
node->parent !=
NULL) && (destParent !=
node->parent))
10197 return (xmlDOMWrapAdoptBranch(ctxt, sourceDoc,
node,
10198 destDoc, destParent,
options));
10200 return (xmlDOMWrapAdoptAttr(ctxt, sourceDoc,
10206 cur->doc = destDoc;
10210 if ((sourceDoc !=
NULL) &&
10211 (sourceDoc->
dict == destDoc->
dict))
10213 switch (
node->type) {
10225 if ((destDoc->intSubset) || (destDoc->extSubset)) {
ACPI_SIZE strlen(const char *String)
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
xmlBufPtr xmlBufFromBuffer(xmlBufferPtr buffer)
int xmlBufIsEmpty(const xmlBufPtr buf)
void xmlBufFree(xmlBufPtr buf)
xmlChar * xmlBufDetach(xmlBufPtr buf)
xmlBufPtr xmlBufCreateSize(size_t size)
xmlBufPtr xmlBufCreate(void)
int xmlBufSetAllocationScheme(xmlBufPtr buf, xmlBufferAllocationScheme scheme)
xmlBufferPtr xmlBufBackToBuffer(xmlBufPtr buf)
int xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len)
int xmlBufCat(xmlBufPtr buf, const xmlChar *str)
static const WCHAR version[]
BOOL next_node(stream_t *stream, strbuf_t *buf)
__kernel_ptrdiff_t ptrdiff_t
XMLPUBFUN xmlChar *XMLCALL xmlEncodeSpecialChars(const xmlDoc *doc, const xmlChar *input)
XMLPUBFUN xmlEntityPtr XMLCALL xmlGetDocEntity(const xmlDoc *doc, const xmlChar *name)
XMLPUBFUN void XMLCALL xmlFreeEntitiesTable(xmlEntitiesTablePtr table)
@ XML_EXTERNAL_GENERAL_PARSED_ENTITY
@ XML_INTERNAL_PREDEFINED_ENTITY
@ XML_EXTERNAL_GENERAL_UNPARSED_ENTITY
@ XML_INTERNAL_GENERAL_ENTITY
@ XML_INTERNAL_PARAMETER_ENTITY
@ XML_EXTERNAL_PARAMETER_ENTITY
XMLPUBFUN xmlChar *XMLCALL xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input)
xmlEntitiesTable * xmlEntitiesTablePtr
GLint GLint GLsizei GLsizei GLsizei depth
GLuint GLuint GLsizei GLenum type
GLdouble GLdouble GLdouble GLdouble q
GLenum GLuint GLenum GLsizei const GLchar * buf
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
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 j
_Check_return_opt_ _CRTIMP size_t __cdecl fwrite(_In_reads_bytes_(_Size *_Count) const void *_Str, _In_ size_t _Size, _In_ size_t _Count, _Inout_ FILE *_File)
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
static unsigned int number
static char memory[1024 *256]
XMLPUBVAR const xmlChar xmlStringComment[]
XMLPUBVAR const xmlChar xmlStringTextNoenc[]
XMLPUBFUN int XMLCALL xmlCopyCharMultiByte(xmlChar *out, int val)
XMLPUBVAR const xmlChar xmlStringText[]
static unsigned __int64 next
xmlChar * xmlEncodeAttributeEntities(xmlDocPtr doc, const xmlChar *input)
XMLPUBFUN const xmlChar *XMLCALL xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len)
XMLPUBFUN int XMLCALL xmlDictOwns(xmlDictPtr dict, const xmlChar *str)
XMLPUBFUN void XMLCALL xmlDictFree(xmlDictPtr dict)
XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme
XMLPUBVAR xmlMallocFunc xmlMallocAtomic
XMLPUBVAR xmlStrdupFunc xmlMemStrdup
XMLPUBVAR xmlMallocFunc xmlMalloc
XMLPUBVAR int xmlDefaultBufferSize
XMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue
XMLPUBVAR xmlRegisterNodeFunc xmlRegisterNodeDefaultValue
XMLPUBVAR xmlFreeFunc xmlFree
XMLPUBVAR void * xmlGenericErrorContext
XMLPUBVAR xmlReallocFunc xmlRealloc
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
XMLPUBFUN void *XMLCALL xmlHashLookup(xmlHashTablePtr table, const xmlChar *name)
XMLPUBFUN int XMLCALL xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name, xmlHashDeallocator f)
XMLPUBFUN xmlNodePtr XMLCALL xmlAddChild(xmlNodePtr parent, xmlNodePtr cur)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewReference(const xmlDoc *doc, const xmlChar *name)
XMLPUBFUN void XMLCALL xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme)
XMLPUBFUN int XMLCALL xmlGetDocCompressMode(const xmlDoc *doc)
XMLPUBFUN void XMLCALL xmlBufferFree(xmlBufferPtr buf)
XMLPUBFUN xmlChar *XMLCALL xmlNodeGetContent(const xmlNode *cur)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewComment(const xmlChar *content)
XMLPUBFUN xmlNsPtr XMLCALL xmlCopyNamespace(xmlNsPtr cur)
XMLPUBFUN xmlDtdPtr XMLCALL xmlNewDtd(xmlDocPtr doc, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID)
XMLPUBFUN xmlNodePtr XMLCALL xmlDocGetRootElement(const xmlDoc *doc)
XMLPUBFUN int XMLCALL xmlDOMWrapCloneNode(xmlDOMWrapCtxtPtr ctxt, xmlDocPtr sourceDoc, xmlNodePtr node, xmlNodePtr *clonedNode, xmlDocPtr destDoc, xmlNodePtr destParent, int deep, int options)
XMLPUBFUN void XMLCALL xmlSetListDoc(xmlNodePtr list, xmlDocPtr doc)
XMLPUBFUN xmlDtdPtr XMLCALL xmlCreateIntSubset(xmlDocPtr doc, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID)
XMLPUBFUN xmlNodePtr XMLCALL xmlGetLastChild(const xmlNode *parent)
XMLPUBFUN void XMLCALL xmlSetCompressMode(int mode)
XMLPUBFUN void XMLCALL xmlFreeDtd(xmlDtdPtr cur)
XMLPUBFUN void XMLCALL xmlBufferWriteChar(xmlBufferPtr buf, const char *string)
XMLPUBFUN void XMLCALL xmlFreeDoc(xmlDocPtr cur)
XMLPUBFUN xmlAttrPtr XMLCALL xmlHasProp(const xmlNode *node, const xmlChar *name)
XMLPUBFUN int XMLCALL xmlBufferResize(xmlBufferPtr buf, unsigned int size)
XMLPUBFUN int XMLCALL xmlBufferAdd(xmlBufferPtr buf, const xmlChar *str, int len)
XMLPUBFUN xmlChar *XMLCALL xmlGetProp(const xmlNode *node, const xmlChar *name)
XMLPUBFUN xmlNsPtr XMLCALL xmlSearchNs(xmlDocPtr doc, xmlNodePtr node, const xmlChar *nameSpace)
XMLPUBFUN xmlAttrPtr XMLCALL xmlCopyPropList(xmlNodePtr target, xmlAttrPtr cur)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocNode(xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content)
XMLPUBFUN int XMLCALL xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt, xmlNodePtr elem, int options)
XMLPUBFUN int XMLCALL xmlNodeBufGetContent(xmlBufferPtr buffer, const xmlNode *cur)
XMLPUBFUN int XMLCALL xmlTextConcat(xmlNodePtr node, const xmlChar *content, int len)
XMLPUBFUN xmlNodePtr XMLCALL xmlCopyNode(xmlNodePtr node, int recursive)
XMLPUBFUN xmlBufferPtr XMLCALL xmlBufferCreateStatic(void *mem, size_t size)
XMLPUBFUN xmlNodePtr XMLCALL xmlStringGetNodeList(const xmlDoc *doc, const xmlChar *value)
XMLPUBFUN int XMLCALL xmlNodeIsText(const xmlNode *node)
XMLPUBFUN int XMLCALL xmlNodeGetSpacePreserve(const xmlNode *cur)
XMLPUBFUN xmlChar *XMLCALL xmlGetNoNsProp(const xmlNode *node, const xmlChar *name)
XMLPUBFUN void XMLCALL xmlDOMWrapFreeCtxt(xmlDOMWrapCtxtPtr ctxt)
XMLPUBFUN void XMLCALL xmlNodeAddContent(xmlNodePtr cur, const xmlChar *content)
XMLPUBFUN xmlChar *XMLCALL xmlBuildQName(const xmlChar *ncname, const xmlChar *prefix, xmlChar *memory, int len)
xmlElement * xmlElementPtr
XMLPUBFUN void XMLCALL xmlNodeAddContentLen(xmlNodePtr cur, const xmlChar *content, int len)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewTextLen(const xmlChar *content, int len)
XMLPUBFUN xmlDocPtr XMLCALL xmlNewDoc(const xmlChar *version)
XMLPUBFUN int XMLCALL xmlRemoveProp(xmlAttrPtr cur)
XMLPUBFUN xmlChar *XMLCALL xmlGetNsProp(const xmlNode *node, const xmlChar *name, const xmlChar *nameSpace)
XMLPUBFUN void XMLCALL xmlSetNs(xmlNodePtr node, xmlNsPtr ns)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewCharRef(xmlDocPtr doc, const xmlChar *name)
XMLPUBFUN xmlAttrPtr XMLCALL xmlNewDocProp(xmlDocPtr doc, const xmlChar *name, const xmlChar *value)
XMLPUBFUN xmlNodePtr XMLCALL xmlCopyNodeList(xmlNodePtr node)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewPI(const xmlChar *name, const xmlChar *content)
XMLPUBFUN xmlAttrPtr XMLCALL xmlCopyProp(xmlNodePtr target, xmlAttrPtr cur)
XMLPUBFUN xmlDOMWrapCtxtPtr XMLCALL xmlDOMWrapNewCtxt(void)
XMLPUBFUN xmlNodePtr XMLCALL xmlTextMerge(xmlNodePtr first, xmlNodePtr second)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewText(const xmlChar *content)
XMLPUBFUN void XMLCALL xmlFreeNsList(xmlNsPtr cur)
XMLPUBFUN int XMLCALL xmlBufferCCat(xmlBufferPtr buf, const char *str)
XMLPUBFUN xmlNodePtr XMLCALL xmlAddNextSibling(xmlNodePtr cur, xmlNodePtr elem)
XMLPUBFUN void XMLCALL xmlBufferWriteCHAR(xmlBufferPtr buf, const xmlChar *string)
XMLPUBFUN xmlDtdPtr XMLCALL xmlGetIntSubset(const xmlDoc *doc)
XMLPUBFUN int XMLCALL xmlGetCompressMode(void)
XMLPUBFUN void XMLCALL xmlUnlinkNode(xmlNodePtr cur)
XMLPUBFUN xmlBufferPtr XMLCALL xmlBufferCreate(void)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocPI(xmlDocPtr doc, const xmlChar *name, const xmlChar *content)
XMLPUBFUN xmlNsPtr XMLCALL xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar *href)
XMLPUBFUN void XMLCALL xmlSetTreeDoc(xmlNodePtr tree, xmlDocPtr doc)
XMLPUBFUN xmlNodePtr XMLCALL xmlAddSibling(xmlNodePtr cur, xmlNodePtr elem)
XMLPUBFUN xmlChar *XMLCALL xmlNodeGetBase(const xmlDoc *doc, const xmlNode *cur)
XMLPUBFUN int XMLCALL xmlBufferShrink(xmlBufferPtr buf, unsigned int len)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocTextLen(xmlDocPtr doc, const xmlChar *content, int len)
XMLPUBFUN xmlBufferAllocationScheme XMLCALL xmlGetBufferAllocationScheme(void)
XMLPUBFUN int XMLCALL xmlDOMWrapAdoptNode(xmlDOMWrapCtxtPtr ctxt, xmlDocPtr sourceDoc, xmlNodePtr node, xmlDocPtr destDoc, xmlNodePtr destParent, int options)
XMLPUBFUN int XMLCALL xmlBufferGrow(xmlBufferPtr buf, unsigned int len)
xmlBufferAllocationScheme
@ XML_BUFFER_ALLOC_IMMUTABLE
@ XML_BUFFER_ALLOC_DOUBLEIT
@ XML_BUFFER_ALLOC_HYBRID
#define XML_XML_NAMESPACE
XMLPUBFUN xmlBufferPtr XMLCALL xmlBufferCreateSize(size_t size)
XMLPUBFUN int XMLCALL xmlBufGetNodeContent(xmlBufPtr buf, const xmlNode *cur)
XMLPUBFUN void XMLCALL xmlFreeProp(xmlAttrPtr cur)
XMLPUBFUN void XMLCALL xmlFreePropList(xmlAttrPtr cur)
XMLPUBFUN xmlAttrPtr XMLCALL xmlNewNsPropEatName(xmlNodePtr node, xmlNsPtr ns, xmlChar *name, const xmlChar *value)
XMLPUBFUN void XMLCALL xmlNodeSetContent(xmlNodePtr cur, const xmlChar *content)
XMLPUBFUN int XMLCALL xmlIsBlankNode(const xmlNode *node)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocText(const xmlDoc *doc, const xmlChar *content)
XMLPUBFUN int XMLCALL xmlDOMWrapRemoveNode(xmlDOMWrapCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr node, int options)
XMLPUBFUN void XMLCALL xmlFreeNs(xmlNsPtr cur)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocComment(xmlDocPtr doc, const xmlChar *content)
XMLPUBFUN long XMLCALL xmlGetLineNo(const xmlNode *node)
XMLPUBFUN const xmlChar *XMLCALL xmlBufferContent(const xmlBuffer *buf)
XMLPUBFUN xmlNodePtr XMLCALL xmlDocCopyNodeList(xmlDocPtr doc, xmlNodePtr node)
XMLPUBFUN void XMLCALL xmlFreeNodeList(xmlNodePtr cur)
XMLPUBFUN xmlAttrPtr XMLCALL xmlHasNsProp(const xmlNode *node, const xmlChar *name, const xmlChar *nameSpace)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewNodeEatName(xmlNsPtr ns, xmlChar *name)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocNodeEatName(xmlDocPtr doc, xmlNsPtr ns, xmlChar *name, const xmlChar *content)
XMLPUBFUN xmlChar *XMLCALL xmlBufferDetach(xmlBufferPtr buf)
XMLPUBFUN void XMLCALL xmlBufferWriteQuotedString(xmlBufferPtr buf, const xmlChar *string)
XMLPUBFUN void XMLCALL xmlFreeNode(xmlNodePtr cur)
XMLPUBFUN int XMLCALL xmlBufferLength(const xmlBuffer *buf)
XMLPUBFUN xmlChar *XMLCALL xmlNodeGetLang(const xmlNode *cur)
XMLPUBFUN const xmlChar *XMLCALL xmlSplitQName3(const xmlChar *name, int *len)
XMLPUBFUN xmlNodePtr XMLCALL xmlAddChildList(xmlNodePtr parent, xmlNodePtr cur)
XMLPUBFUN xmlNsPtr XMLCALL xmlNewNs(xmlNodePtr node, const xmlChar *href, const xmlChar *prefix)
XMLPUBFUN int XMLCALL xmlBufferCat(xmlBufferPtr buf, const xmlChar *str)
XMLPUBFUN xmlChar *XMLCALL xmlSplitQName2(const xmlChar *name, xmlChar **prefix)
XMLPUBFUN xmlAttrPtr XMLCALL xmlNewNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name, const xmlChar *value)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewCDataBlock(xmlDocPtr doc, const xmlChar *content, int len)
xmlAttribute * xmlAttributePtr
XMLPUBFUN xmlNsPtr XMLCALL xmlCopyNamespaceList(xmlNsPtr cur)
XMLPUBFUN int XMLCALL xmlBufferDump(FILE *file, xmlBufferPtr buf)
XMLPUBFUN int XMLCALL xmlBufferAddHead(xmlBufferPtr buf, const xmlChar *str, int len)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewNode(xmlNsPtr ns, const xmlChar *name)
XMLPUBFUN void XMLCALL xmlBufferSetAllocationScheme(xmlBufferPtr buf, xmlBufferAllocationScheme scheme)
XMLPUBFUN void XMLCALL xmlSetDocCompressMode(xmlDocPtr doc, int mode)
#define XML_LOCAL_NAMESPACE
XMLPUBFUN void XMLCALL xmlBufferEmpty(xmlBufferPtr buf)
XMLPUBFUN xmlChar *XMLCALL xmlNodeListGetString(xmlDocPtr doc, const xmlNode *list, int inLine)
XMLPUBFUN xmlNodePtr XMLCALL xmlDocCopyNode(xmlNodePtr node, xmlDocPtr doc, int recursive)
XMLPUBFUN xmlNodePtr XMLCALL xmlStringLenGetNodeList(const xmlDoc *doc, const xmlChar *value, int len)
int __xmlRegisterCallbacks
static xmlNsPtr xmlNewReconciledNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns)
#define XML_NSMAP_POP(m, i)
static void xmlTreeErrMemory(const char *extra)
#define DICT_CONST_COPY(str, cpy)
#define XML_TREE_ADOPT_STR_2(str)
#define UPDATE_LAST_CHILD_AND_PARENT(n)
#define XML_TREE_NSMAP_DOC
#define XML_TREE_NSMAP_CUSTOM
#define XML_NSMAP_NOTEMPTY(m)
#define DICT_COPY(str, cpy)
static xmlChar * xmlGetPropNodeValueInternal(const xmlAttr *prop)
#define XML_TREE_NSMAP_PARENT
#define XML_NSMAP_FOREACH(m, i)
#define XML_TREE_ADOPT_STR(str)
struct _xmlNode * children
const xmlChar * defaultValue
xmlDOMWrapAcquireNsFunction getNsForNodeFunc
struct _xmlDtd * intSubset
struct _xmlNode * children
struct _xmlDtd * extSubset
struct _xmlNode * children
const xmlChar * ExternalID
const xmlChar * ExternalID
struct _xmlNode * children
struct _xmlNode * children
Character const *const prefix
XMLPUBFUN xmlChar *XMLCALL xmlPathToURI(const xmlChar *path)
XMLPUBFUN xmlChar *XMLCALL xmlBuildURI(const xmlChar *URI, const xmlChar *base)
XML_DEPRECATED XMLPUBFUN void XMLCALL xmlFreeRefTable(xmlRefTablePtr table)
XMLPUBFUN xmlIDPtr XMLCALL xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value, xmlAttrPtr attr)
XMLPUBFUN xmlElementPtr XMLCALL xmlGetDtdQElementDesc(xmlDtdPtr dtd, const xmlChar *name, const xmlChar *prefix)
XMLPUBFUN void XMLCALL xmlFreeIDTable(xmlIDTablePtr table)
XMLPUBFUN xmlAttributePtr XMLCALL xmlGetDtdQAttrDesc(xmlDtdPtr dtd, const xmlChar *elem, const xmlChar *name, const xmlChar *prefix)
XMLPUBFUN int XMLCALL xmlRemoveID(xmlDocPtr doc, xmlAttrPtr attr)
XMLPUBFUN void XMLCALL xmlFreeNotationTable(xmlNotationTablePtr table)
XMLPUBFUN int XMLCALL xmlIsID(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr)
XMLPUBFUN void XMLCALL xmlFreeElementTable(xmlElementTablePtr table)
XMLPUBFUN xmlAttributePtr XMLCALL xmlGetDtdAttrDesc(xmlDtdPtr dtd, const xmlChar *elem, const xmlChar *name)
XMLPUBFUN void XMLCALL xmlFreeAttributeTable(xmlAttributeTablePtr table)
static const WCHAR lang[]
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
@ XML_TREE_UNTERMINATED_ENTITY
XMLPUBFUN const xmlChar *XMLCALL xmlStrchr(const xmlChar *str, xmlChar val)
XMLPUBFUN xmlChar *XMLCALL xmlStrndup(const xmlChar *cur, int len)
XMLPUBFUN int XMLCALL xmlStrcasecmp(const xmlChar *str1, const xmlChar *str2)
XMLPUBFUN xmlChar *XMLCALL xmlStrcat(xmlChar *cur, const xmlChar *add)
XMLPUBFUN xmlChar *XMLCALL xmlStrncat(xmlChar *cur, const xmlChar *add, int len)
XMLPUBFUN int XMLCALL xmlStrncmp(const xmlChar *str1, const xmlChar *str2, int len)
XMLPUBFUN xmlChar *XMLCALL xmlStrdup(const xmlChar *cur)
XMLPUBFUN xmlChar *XMLCALL xmlStrncatNew(const xmlChar *str1, const xmlChar *str2, int len)
XMLPUBFUN int XMLCALL xmlStrEqual(const xmlChar *str1, const xmlChar *str2)
XMLPUBFUN int XMLCALL xmlStrlen(const xmlChar *str)