27#ifdef LIBXML_OUTPUT_ENABLED
29#define XHTML_NS_NAME BAD_CAST "http://www.w3.org/1999/xhtml"
32 xmlGenericError(xmlGenericErrorContext, \
33 "Unimplemented block at %s:%d\n", \
43 xmlOutputBufferPtr
buf;
66xmlSaveErrMemory(
const char *
extra)
86 msg =
"string is not in UTF-8\n";
89 msg =
"invalid character value\n";
92 msg =
"unknown encoding %s\n";
95 msg =
"document has no DOCTYPE\n";
98 msg =
"unexpected error number\n";
108static unsigned char *
109xmlSerializeHexCharRef(
unsigned char *
out,
int val) {
124 case 0: *
ptr-- =
'0';
break;
125 case 1: *
ptr-- =
'1';
break;
126 case 2: *
ptr-- =
'2';
break;
127 case 3: *
ptr-- =
'3';
break;
128 case 4: *
ptr-- =
'4';
break;
129 case 5: *
ptr-- =
'5';
break;
130 case 6: *
ptr-- =
'6';
break;
131 case 7: *
ptr-- =
'7';
break;
132 case 8: *
ptr-- =
'8';
break;
133 case 9: *
ptr-- =
'9';
break;
134 case 0xA: *
ptr-- =
'A';
break;
135 case 0xB: *
ptr-- =
'B';
break;
136 case 0xC: *
ptr-- =
'C';
break;
137 case 0xD: *
ptr-- =
'D';
break;
138 case 0xE: *
ptr-- =
'E';
break;
139 case 0xF: *
ptr-- =
'F';
break;
140 default: *
ptr-- =
'0';
break;
165xmlEscapeEntities(
unsigned char*
out,
int *outlen,
167 unsigned char* outstart =
out;
168 const unsigned char*
base =
in;
169 unsigned char* outend =
out + *outlen;
170 const unsigned char* inend;
173 inend =
in + (*inlen);
175 while ((
in < inend) && (
out < outend)) {
177 if (outend -
out < 4)
break;
184 }
else if (*
in ==
'>') {
185 if (outend -
out < 4)
break;
192 }
else if (*
in ==
'&') {
193 if (outend -
out < 5)
break;
201 }
else if (((*
in >= 0x20) && (*
in < 0x80)) ||
202 (*
in ==
'\n') || (*
in ==
'\t')) {
208 }
else if (*
in >= 0x80) {
212 if (outend -
out < 11)
break;
218 }
else if (*
in < 0xE0) {
219 if (inend -
in < 2)
break;
220 val = (
in[0]) & 0x1F;
222 val |= (
in[1]) & 0x3F;
224 }
else if (*
in < 0xF0) {
225 if (inend -
in < 3)
break;
226 val = (
in[0]) & 0x0F;
228 val |= (
in[1]) & 0x3F;
230 val |= (
in[2]) & 0x3F;
232 }
else if (*
in < 0xF8) {
233 if (inend -
in < 4)
break;
234 val = (
in[0]) & 0x07;
236 val |= (
in[1]) & 0x3F;
238 val |= (
in[2]) & 0x3F;
240 val |= (
in[3]) & 0x3F;
258 if (outend -
out < 6)
break;
259 out = xmlSerializeHexCharRef(
out, *
in++);
262 "xmlEscapeEntities : char out of range\n");
267 *outlen =
out - outstart;
271 *outlen =
out - outstart;
288xmlSaveCtxtInit(xmlSaveCtxtPtr ctxt)
293 if (ctxt ==
NULL)
return;
294 if ((ctxt->encoding ==
NULL) && (ctxt->escape ==
NULL))
295 ctxt->escape = xmlEscapeEntities;
297 if ((xmlTreeIndentString ==
NULL) || (
len == 0)) {
300 ctxt->indent_size =
len;
301 ctxt->indent_nr =
MAX_INDENT / ctxt->indent_size;
302 for (
i = 0;
i < ctxt->indent_nr;
i++)
303 memcpy(&ctxt->indent[
i * ctxt->indent_size], xmlTreeIndentString,
305 ctxt->indent[ctxt->indent_nr * ctxt->indent_size] = 0;
308 if (xmlSaveNoEmptyTags) {
309 ctxt->options |= XML_SAVE_NO_EMPTY;
319xmlFreeSaveCtxt(xmlSaveCtxtPtr ctxt)
321 if (ctxt ==
NULL)
return;
322 if (ctxt->encoding !=
NULL)
323 xmlFree((
char *) ctxt->encoding);
324 if (ctxt->buf !=
NULL)
325 xmlOutputBufferClose(ctxt->buf);
337xmlNewSaveCtxt(
const char *encoding,
int options)
343 xmlSaveErrMemory(
"creating saving context");
348 if (encoding !=
NULL) {
352 xmlFreeSaveCtxt(
ret);
358 xmlSaveCtxtInit(
ret);
365 if ((
ret->options & XML_SAVE_NO_EMPTY) && ! (
options & XML_SAVE_NO_EMPTY)) {
372 else if (
options & XML_SAVE_WSNONSIG)
392xmlAttrSerializeContent(xmlOutputBufferPtr
buf, xmlAttrPtr
attr)
396 children =
attr->children;
397 while (children !=
NULL) {
398 switch (children->type) {
400 xmlBufAttrSerializeTxtContent(
buf->buffer,
attr->doc,
401 attr, children->content);
403 case XML_ENTITY_REF_NODE:
413 children = children->next;
428 buffer = xmlBufferCreate();
435 xmlBufferSetAllocationScheme(
buffer, XML_BUFFER_ALLOC_DOUBLEIT);
449xmlBufDumpElementDecl(xmlBufPtr
buf, xmlElementPtr
elem) {
452 buffer = xmlBufferCreate();
459 xmlBufferSetAllocationScheme(
buffer, XML_BUFFER_ALLOC_DOUBLEIT);
473xmlBufDumpAttributeDecl(xmlBufPtr
buf, xmlAttributePtr
attr) {
476 buffer = xmlBufferCreate();
483 xmlBufferSetAllocationScheme(
buffer, XML_BUFFER_ALLOC_DOUBLEIT);
496xmlBufDumpEntityDecl(xmlBufPtr
buf, xmlEntityPtr ent) {
499 buffer = xmlBufferCreate();
506 xmlBufferSetAllocationScheme(
buffer, XML_BUFFER_ALLOC_DOUBLEIT);
507 xmlDumpEntityDecl(
buffer, ent);
517static int xmlSaveSwitchEncoding(xmlSaveCtxtPtr ctxt,
const char *encoding) {
518 xmlOutputBufferPtr
buf = ctxt->buf;
524 (
const char *)encoding);
530 xmlSaveErrMemory(
"creating encoding buffer");
541static int xmlSaveClearEncoding(xmlSaveCtxtPtr ctxt) {
542 xmlOutputBufferPtr
buf = ctxt->buf;
543 xmlOutputBufferFlush(
buf);
551#ifdef LIBXML_HTML_ENABLED
553xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr
cur);
555static void xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr
cur);
556static int xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr
cur);
566xmlOutputBufferWriteWSNonSig(xmlSaveCtxtPtr ctxt,
int extra)
569 if ((ctxt ==
NULL) || (ctxt->buf ==
NULL))
571 xmlOutputBufferWrite(ctxt->buf, 1,
"\n");
572 for (
i = 0;
i < (ctxt->level +
extra);
i += ctxt->indent_nr) {
573 xmlOutputBufferWrite(ctxt->buf, ctxt->indent_size *
574 ((ctxt->level +
extra -
i) > ctxt->indent_nr ?
575 ctxt->indent_nr : (ctxt->level +
extra -
i)),
591xmlNsDumpOutput(xmlOutputBufferPtr
buf, xmlNsPtr
cur, xmlSaveCtxtPtr ctxt) {
593 if ((
cur->type == XML_LOCAL_NAMESPACE) && (
cur->href !=
NULL)) {
597 if (ctxt !=
NULL && ctxt->format == 2)
598 xmlOutputBufferWriteWSNonSig(ctxt, 2);
600 xmlOutputBufferWrite(
buf, 1,
" ");
604 xmlOutputBufferWrite(
buf, 6,
"xmlns:");
605 xmlOutputBufferWriteString(
buf, (
const char *)
cur->prefix);
607 xmlOutputBufferWrite(
buf, 5,
"xmlns");
608 xmlOutputBufferWrite(
buf, 1,
"=");
622xmlNsDumpOutputCtxt(xmlSaveCtxtPtr ctxt, xmlNsPtr
cur) {
623 xmlNsDumpOutput(ctxt->buf,
cur, ctxt);
635xmlNsListDumpOutputCtxt(xmlSaveCtxtPtr ctxt, xmlNsPtr
cur) {
637 xmlNsDumpOutput(ctxt->buf,
cur, ctxt);
651xmlNsListDumpOutput(xmlOutputBufferPtr
buf, xmlNsPtr
cur) {
666xmlDtdDumpOutput(xmlSaveCtxtPtr ctxt, xmlDtdPtr dtd) {
667 xmlOutputBufferPtr
buf;
671 if (dtd ==
NULL)
return;
672 if ((ctxt ==
NULL) || (ctxt->buf ==
NULL))
675 xmlOutputBufferWrite(
buf, 10,
"<!DOCTYPE ");
676 xmlOutputBufferWriteString(
buf, (
const char *)dtd->name);
677 if (dtd->ExternalID !=
NULL) {
678 xmlOutputBufferWrite(
buf, 8,
" PUBLIC ");
680 xmlOutputBufferWrite(
buf, 1,
" ");
682 }
else if (dtd->SystemID !=
NULL) {
683 xmlOutputBufferWrite(
buf, 8,
" SYSTEM ");
686 if ((dtd->entities ==
NULL) && (dtd->elements ==
NULL) &&
687 (dtd->attributes ==
NULL) && (dtd->notations ==
NULL) &&
688 (dtd->pentities ==
NULL)) {
689 xmlOutputBufferWrite(
buf, 1,
">");
692 xmlOutputBufferWrite(
buf, 3,
" [\n");
697 if ((dtd->notations !=
NULL) && ((dtd->doc ==
NULL) ||
698 (dtd->doc->intSubset == dtd))) {
699 xmlBufDumpNotationTable(
buf->buffer,
707 xmlNodeDumpOutputInternal(ctxt,
cur);
711 xmlOutputBufferWrite(
buf, 2,
"]>");
722xmlAttrDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr
cur) {
723 xmlOutputBufferPtr
buf;
728 if (ctxt->format == 2)
729 xmlOutputBufferWriteWSNonSig(ctxt, 2);
731 xmlOutputBufferWrite(
buf, 1,
" ");
733 xmlOutputBufferWriteString(
buf, (
const char *)
cur->ns->prefix);
734 xmlOutputBufferWrite(
buf, 1,
":");
736 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
737 xmlOutputBufferWrite(
buf, 2,
"=\"");
738 xmlAttrSerializeContent(
buf,
cur);
739 xmlOutputBufferWrite(
buf, 1,
"\"");
742#ifdef LIBXML_HTML_ENABLED
750htmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr
cur) {
752 const xmlChar *oldctxtenc = ctxt->encoding;
753 const xmlChar *encoding = ctxt->encoding;
754 xmlOutputBufferPtr
buf = ctxt->buf;
755 int switched_encoding = 0;
762 oldenc = doc->encoding;
763 if (ctxt->encoding !=
NULL) {
764 doc->encoding =
BAD_CAST ctxt->encoding;
765 }
else if (doc->encoding !=
NULL) {
766 encoding = doc->encoding;
770 if ((encoding !=
NULL) && (doc !=
NULL))
771 htmlSetMetaEncoding(doc, (
const xmlChar *) encoding);
772 if ((encoding ==
NULL) && (doc !=
NULL))
773 encoding = htmlGetMetaEncoding(doc);
774 if (encoding ==
NULL)
776 if ((encoding !=
NULL) && (oldctxtenc ==
NULL) &&
778 if (xmlSaveSwitchEncoding(ctxt, (
const char*) encoding) < 0) {
779 doc->encoding = oldenc;
782 switched_encoding = 1;
784 if (ctxt->options & XML_SAVE_FORMAT)
785 htmlNodeDumpFormatOutput(
buf, doc,
cur,
786 (
const char *)encoding, 1);
788 htmlNodeDumpFormatOutput(
buf, doc,
cur,
789 (
const char *)encoding, 0);
793 if ((switched_encoding) && (oldctxtenc ==
NULL)) {
794 xmlSaveClearEncoding(ctxt);
797 doc->encoding = oldenc;
809xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr
cur) {
810 int format = ctxt->format;
814 xmlOutputBufferPtr
buf;
823 case XML_DOCUMENT_NODE:
824 case XML_HTML_DOCUMENT_NODE:
825 xmlDocContentDumpOutput(ctxt, (xmlDocPtr)
cur);
829 xmlDtdDumpOutput(ctxt, (xmlDtdPtr)
cur);
832 case XML_DOCUMENT_FRAG_NODE:
841 case XML_ELEMENT_DECL:
842 xmlBufDumpElementDecl(
buf->buffer, (xmlElementPtr)
cur);
845 case XML_ATTRIBUTE_DECL:
846 xmlBufDumpAttributeDecl(
buf->buffer, (xmlAttributePtr)
cur);
849 case XML_ENTITY_DECL:
850 xmlBufDumpEntityDecl(
buf->buffer, (xmlEntityPtr)
cur);
853 case XML_ELEMENT_NODE:
854 if ((
cur !=
root) && (ctxt->format == 1) &&
855 (xmlIndentTreeOutput))
856 xmlOutputBufferWrite(
buf, ctxt->indent_size *
857 (ctxt->level > ctxt->indent_nr ?
858 ctxt->indent_nr : ctxt->level),
867 xmlNodeDumpOutputInternal(ctxt,
cur);
871 xmlOutputBufferWrite(
buf, 1,
"<");
873 xmlOutputBufferWriteString(
buf, (
const char *)
cur->ns->prefix);
874 xmlOutputBufferWrite(
buf, 1,
":");
876 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
878 xmlNsListDumpOutputCtxt(ctxt,
cur->nsDef);
880 xmlAttrDumpOutput(ctxt,
attr);
883 if ((ctxt->options & XML_SAVE_NO_EMPTY) == 0) {
884 if (ctxt->format == 2)
885 xmlOutputBufferWriteWSNonSig(ctxt, 0);
886 xmlOutputBufferWrite(
buf, 2,
"/>");
888 if (ctxt->format == 2)
889 xmlOutputBufferWriteWSNonSig(ctxt, 1);
890 xmlOutputBufferWrite(
buf, 3,
"></");
892 xmlOutputBufferWriteString(
buf,
893 (
const char *)
cur->ns->prefix);
894 xmlOutputBufferWrite(
buf, 1,
":");
896 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
897 if (ctxt->format == 2)
898 xmlOutputBufferWriteWSNonSig(ctxt, 0);
899 xmlOutputBufferWrite(
buf, 1,
">");
902 if (ctxt->format == 1) {
904 while (tmp !=
NULL) {
905 if ((tmp->type == XML_TEXT_NODE) ||
906 (tmp->type == XML_CDATA_SECTION_NODE) ||
907 (tmp->type == XML_ENTITY_REF_NODE)) {
909 unformattedNode =
cur;
915 if (ctxt->format == 2)
916 xmlOutputBufferWriteWSNonSig(ctxt, 1);
917 xmlOutputBufferWrite(
buf, 1,
">");
918 if (ctxt->format == 1) xmlOutputBufferWrite(
buf, 1,
"\n");
919 if (ctxt->level >= 0) ctxt->level++;
931 xmlOutputBufferWriteEscape(
buf,
cur->content, ctxt->escape);
936 xmlOutputBufferWriteString(
buf, (
const char *)
cur->content);
941 if ((
cur !=
root) && (ctxt->format == 1) && (xmlIndentTreeOutput))
942 xmlOutputBufferWrite(
buf, ctxt->indent_size *
943 (ctxt->level > ctxt->indent_nr ?
944 ctxt->indent_nr : ctxt->level),
948 xmlOutputBufferWrite(
buf, 2,
"<?");
949 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
951 if (ctxt->format == 2)
952 xmlOutputBufferWriteWSNonSig(ctxt, 0);
954 xmlOutputBufferWrite(
buf, 1,
" ");
955 xmlOutputBufferWriteString(
buf,
956 (
const char *)
cur->content);
958 xmlOutputBufferWrite(
buf, 2,
"?>");
960 xmlOutputBufferWrite(
buf, 2,
"<?");
961 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
962 if (ctxt->format == 2)
963 xmlOutputBufferWriteWSNonSig(ctxt, 0);
964 xmlOutputBufferWrite(
buf, 2,
"?>");
968 case XML_COMMENT_NODE:
969 if ((
cur !=
root) && (ctxt->format == 1) && (xmlIndentTreeOutput))
970 xmlOutputBufferWrite(
buf, ctxt->indent_size *
971 (ctxt->level > ctxt->indent_nr ?
972 ctxt->indent_nr : ctxt->level),
976 xmlOutputBufferWrite(
buf, 4,
"<!--");
977 xmlOutputBufferWriteString(
buf, (
const char *)
cur->content);
978 xmlOutputBufferWrite(
buf, 3,
"-->");
982 case XML_ENTITY_REF_NODE:
983 xmlOutputBufferWrite(
buf, 1,
"&");
984 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
985 xmlOutputBufferWrite(
buf, 1,
";");
988 case XML_CDATA_SECTION_NODE:
989 if (
cur->content ==
NULL || *
cur->content ==
'\0') {
990 xmlOutputBufferWrite(
buf, 12,
"<![CDATA[]]>");
993 while (*
end !=
'\0') {
994 if ((*
end ==
']') && (*(
end + 1) ==
']') &&
995 (*(
end + 2) ==
'>')) {
997 xmlOutputBufferWrite(
buf, 9,
"<![CDATA[");
999 (
const char *)
start);
1000 xmlOutputBufferWrite(
buf, 3,
"]]>");
1006 xmlOutputBufferWrite(
buf, 9,
"<![CDATA[");
1007 xmlOutputBufferWriteString(
buf, (
const char *)
start);
1008 xmlOutputBufferWrite(
buf, 3,
"]]>");
1013 case XML_ATTRIBUTE_NODE:
1014 xmlAttrDumpOutput(ctxt, (xmlAttrPtr)
cur);
1017 case XML_NAMESPACE_DECL:
1018 xmlNsDumpOutputCtxt(ctxt, (xmlNsPtr)
cur);
1028 if ((ctxt->format == 1) &&
1029 (
cur->type != XML_XINCLUDE_START) &&
1030 (
cur->type != XML_XINCLUDE_END))
1031 xmlOutputBufferWrite(
buf, 1,
"\n");
1041 if (
cur->type == XML_ELEMENT_NODE) {
1042 if (ctxt->level > 0) ctxt->level--;
1043 if ((xmlIndentTreeOutput) && (ctxt->format == 1))
1044 xmlOutputBufferWrite(
buf, ctxt->indent_size *
1045 (ctxt->level > ctxt->indent_nr ?
1046 ctxt->indent_nr : ctxt->level),
1049 xmlOutputBufferWrite(
buf, 2,
"</");
1051 xmlOutputBufferWriteString(
buf,
1052 (
const char *)
cur->ns->prefix);
1053 xmlOutputBufferWrite(
buf, 1,
":");
1056 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
1057 if (ctxt->format == 2)
1058 xmlOutputBufferWriteWSNonSig(ctxt, 0);
1059 xmlOutputBufferWrite(
buf, 1,
">");
1061 if (
cur == unformattedNode) {
1063 unformattedNode =
NULL;
1077xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr
cur) {
1078#ifdef LIBXML_HTML_ENABLED
1083 const xmlChar *oldctxtenc = ctxt->encoding;
1084 const xmlChar *encoding = ctxt->encoding;
1087 xmlOutputBufferPtr
buf = ctxt->buf;
1089 int switched_encoding = 0;
1093 if ((
cur->type != XML_HTML_DOCUMENT_NODE) &&
1094 (
cur->type != XML_DOCUMENT_NODE))
1097 if (ctxt->encoding !=
NULL) {
1099 }
else if (
cur->encoding !=
NULL) {
1100 encoding =
cur->encoding;
1103 if (((
cur->type == XML_HTML_DOCUMENT_NODE) &&
1104 ((ctxt->options & XML_SAVE_AS_XML) == 0) &&
1105 ((ctxt->options & XML_SAVE_XHTML) == 0)) ||
1106 (ctxt->options & XML_SAVE_AS_HTML)) {
1107#ifdef LIBXML_HTML_ENABLED
1108 if (encoding !=
NULL)
1109 htmlSetMetaEncoding(
cur, (
const xmlChar *) encoding);
1110 if (encoding ==
NULL)
1111 encoding = htmlGetMetaEncoding(
cur);
1112 if (encoding ==
NULL)
1114 if ((encoding !=
NULL) && (oldctxtenc ==
NULL) &&
1116 if (xmlSaveSwitchEncoding(ctxt, (
const char*) encoding) < 0) {
1117 cur->encoding = oldenc;
1121 if (ctxt->options & XML_SAVE_FORMAT)
1122 htmlDocContentDumpFormatOutput(
buf,
cur,
1123 (
const char *)encoding, 1);
1125 htmlDocContentDumpFormatOutput(
buf,
cur,
1126 (
const char *)encoding, 0);
1127 if (ctxt->encoding !=
NULL)
1128 cur->encoding = oldenc;
1133 }
else if ((
cur->type == XML_DOCUMENT_NODE) ||
1134 (ctxt->options & XML_SAVE_AS_XML) ||
1135 (ctxt->options & XML_SAVE_XHTML)) {
1137 if ((encoding !=
NULL) && (oldctxtenc ==
NULL) &&
1139 ((ctxt->options & XML_SAVE_NO_DECL) == 0)) {
1148 if (xmlSaveSwitchEncoding(ctxt, (
const char*) encoding) < 0) {
1149 cur->encoding = oldenc;
1152 switched_encoding = 1;
1154 if (ctxt->escape == xmlEscapeEntities)
1155 ctxt->escape =
NULL;
1156 if (ctxt->escapeAttr == xmlEscapeEntities)
1157 ctxt->escapeAttr =
NULL;
1164 if ((ctxt->options & XML_SAVE_NO_DECL) == 0) {
1165 xmlOutputBufferWrite(
buf, 14,
"<?xml version=");
1169 xmlOutputBufferWrite(
buf, 5,
"\"1.0\"");
1170 if (encoding !=
NULL) {
1171 xmlOutputBufferWrite(
buf, 10,
" encoding=");
1174 switch (
cur->standalone) {
1176 xmlOutputBufferWrite(
buf, 16,
" standalone=\"no\"");
1179 xmlOutputBufferWrite(
buf, 17,
" standalone=\"yes\"");
1182 xmlOutputBufferWrite(
buf, 3,
"?>\n");
1185#ifdef LIBXML_HTML_ENABLED
1186 if (ctxt->options & XML_SAVE_XHTML)
1188 if ((ctxt->options & XML_SAVE_NO_XHTML) == 0) {
1189 dtd = xmlGetIntSubset(
cur);
1191 is_xhtml = xmlIsXHTML(dtd->SystemID, dtd->ExternalID);
1192 if (is_xhtml < 0) is_xhtml = 0;
1201#ifdef LIBXML_HTML_ENABLED
1203 xhtmlNodeDumpOutput(ctxt,
child);
1206 xmlNodeDumpOutputInternal(ctxt,
child);
1207 if ((
child->type != XML_XINCLUDE_START) &&
1208 (
child->type != XML_XINCLUDE_END))
1209 xmlOutputBufferWrite(
buf, 1,
"\n");
1218 if ((switched_encoding) && (oldctxtenc ==
NULL)) {
1219 xmlSaveClearEncoding(ctxt);
1220 ctxt->escape = oldescape;
1221 ctxt->escapeAttr = oldescapeAttr;
1223 cur->encoding = oldenc;
1227#ifdef LIBXML_HTML_ENABLED
1243xhtmlIsEmpty(xmlNodePtr
node) {
1246 if (
node->type != XML_ELEMENT_NODE)
1252 switch (
node->name[0]) {
1308xhtmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr
cur) {
1309 xmlAttrPtr xml_lang =
NULL;
1312 xmlAttrPtr
id =
NULL;
1314 xmlOutputBufferPtr
buf;
1334 (
cur->children->content ==
NULL) ||
1335 (
cur->children->content[0] == 0)) &&
1336 (htmlIsBooleanAttr(
cur->name))) {
1338 xmlFreeNode(
cur->children);
1339 cur->children = xmlNewDocText(
cur->doc,
cur->name);
1341 cur->children->parent = (xmlNodePtr)
cur;
1343 xmlAttrDumpOutput(ctxt,
cur);
1360 xmlOutputBufferWrite(
buf, 5,
" id=\"");
1361 xmlAttrSerializeContent(
buf,
name);
1362 xmlOutputBufferWrite(
buf, 1,
"\"");
1369 xmlOutputBufferWrite(
buf, 11,
" xml:lang=\"");
1370 xmlAttrSerializeContent(
buf,
lang);
1371 xmlOutputBufferWrite(
buf, 1,
"\"");
1374 xmlOutputBufferWrite(
buf, 7,
" lang=\"");
1375 xmlAttrSerializeContent(
buf, xml_lang);
1376 xmlOutputBufferWrite(
buf, 1,
"\"");
1392xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr
cur) {
1393 int format = ctxt->format, addmeta;
1396 xmlOutputBufferPtr
buf = ctxt->buf;
1403 switch (
cur->type) {
1404 case XML_DOCUMENT_NODE:
1405 case XML_HTML_DOCUMENT_NODE:
1406 xmlDocContentDumpOutput(ctxt, (xmlDocPtr)
cur);
1409 case XML_NAMESPACE_DECL:
1410 xmlNsDumpOutputCtxt(ctxt, (xmlNsPtr)
cur);
1414 xmlDtdDumpOutput(ctxt, (xmlDtdPtr)
cur);
1417 case XML_DOCUMENT_FRAG_NODE:
1426 case XML_ELEMENT_DECL:
1427 xmlBufDumpElementDecl(
buf->buffer, (xmlElementPtr)
cur);
1430 case XML_ATTRIBUTE_DECL:
1431 xmlBufDumpAttributeDecl(
buf->buffer, (xmlAttributePtr)
cur);
1434 case XML_ENTITY_DECL:
1435 xmlBufDumpEntityDecl(
buf->buffer, (xmlEntityPtr)
cur);
1438 case XML_ELEMENT_NODE:
1441 if ((
cur !=
root) && (ctxt->format == 1) && (xmlIndentTreeOutput))
1442 xmlOutputBufferWrite(
buf, ctxt->indent_size *
1443 (ctxt->level > ctxt->indent_nr ?
1444 ctxt->indent_nr : ctxt->level),
1453 xhtmlNodeDumpOutput(ctxt,
cur);
1457 xmlOutputBufferWrite(
buf, 1,
"<");
1459 xmlOutputBufferWriteString(
buf, (
const char *)
cur->ns->prefix);
1460 xmlOutputBufferWrite(
buf, 1,
":");
1463 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
1465 xmlNsListDumpOutputCtxt(ctxt,
cur->nsDef);
1471 xmlOutputBufferWriteString(
buf,
1472 " xmlns=\"http://www.w3.org/1999/xhtml\"");
1475 xhtmlAttrListDumpOutput(ctxt,
cur->properties);
1478 (
parent->parent == (xmlNodePtr)
cur->doc) &&
1482 tmp =
cur->children;
1483 while (tmp !=
NULL) {
1487 httpequiv = xmlGetProp(tmp,
BAD_CAST"http-equiv");
1488 if (httpequiv !=
NULL) {
1505 ((xhtmlIsEmpty(
cur) == 1) && (addmeta == 0))) {
1509 xmlOutputBufferWrite(
buf, 3,
" />");
1512 xmlOutputBufferWrite(
buf, 1,
">");
1513 if (ctxt->format == 1) {
1514 xmlOutputBufferWrite(
buf, 1,
"\n");
1515 if (xmlIndentTreeOutput)
1516 xmlOutputBufferWrite(
buf, ctxt->indent_size *
1517 (ctxt->level + 1 > ctxt->indent_nr ?
1518 ctxt->indent_nr : ctxt->level + 1),
1521 xmlOutputBufferWriteString(
buf,
1522 "<meta http-equiv=\"Content-Type\" "
1523 "content=\"text/html; charset=");
1524 if (ctxt->encoding) {
1525 xmlOutputBufferWriteString(
buf,
1526 (
const char *)ctxt->encoding);
1528 xmlOutputBufferWrite(
buf, 5,
"UTF-8");
1530 xmlOutputBufferWrite(
buf, 4,
"\" />");
1531 if (ctxt->format == 1)
1532 xmlOutputBufferWrite(
buf, 1,
"\n");
1534 xmlOutputBufferWrite(
buf, 1,
">");
1539 xmlOutputBufferWrite(
buf, 2,
"</");
1541 xmlOutputBufferWriteString(
buf,
1542 (
const char *)
cur->ns->prefix);
1543 xmlOutputBufferWrite(
buf, 1,
":");
1545 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
1546 xmlOutputBufferWrite(
buf, 1,
">");
1549 xmlOutputBufferWrite(
buf, 1,
">");
1551 if (ctxt->format == 1) {
1552 xmlOutputBufferWrite(
buf, 1,
"\n");
1553 if (xmlIndentTreeOutput)
1554 xmlOutputBufferWrite(
buf, ctxt->indent_size *
1555 (ctxt->level + 1 > ctxt->indent_nr ?
1556 ctxt->indent_nr : ctxt->level + 1),
1559 xmlOutputBufferWriteString(
buf,
1560 "<meta http-equiv=\"Content-Type\" "
1561 "content=\"text/html; charset=");
1562 if (ctxt->encoding) {
1563 xmlOutputBufferWriteString(
buf,
1564 (
const char *)ctxt->encoding);
1566 xmlOutputBufferWrite(
buf, 5,
"UTF-8");
1568 xmlOutputBufferWrite(
buf, 4,
"\" />");
1571 if (ctxt->format == 1) {
1572 tmp =
cur->children;
1573 while (tmp !=
NULL) {
1574 if ((tmp->type == XML_TEXT_NODE) ||
1575 (tmp->type == XML_ENTITY_REF_NODE)) {
1576 unformattedNode =
cur;
1584 if (ctxt->format == 1) xmlOutputBufferWrite(
buf, 1,
"\n");
1585 if (ctxt->level >= 0) ctxt->level++;
1598 xmlOutputBufferWriteEscape(
buf,
cur->content, ctxt->escape);
1603 xmlOutputBufferWriteString(
buf, (
const char *)
cur->content);
1609 xmlOutputBufferWrite(
buf, 2,
"<?");
1610 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
1612 xmlOutputBufferWrite(
buf, 1,
" ");
1613 xmlOutputBufferWriteString(
buf,
1614 (
const char *)
cur->content);
1616 xmlOutputBufferWrite(
buf, 2,
"?>");
1618 xmlOutputBufferWrite(
buf, 2,
"<?");
1619 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
1620 xmlOutputBufferWrite(
buf, 2,
"?>");
1624 case XML_COMMENT_NODE:
1626 xmlOutputBufferWrite(
buf, 4,
"<!--");
1627 xmlOutputBufferWriteString(
buf, (
const char *)
cur->content);
1628 xmlOutputBufferWrite(
buf, 3,
"-->");
1632 case XML_ENTITY_REF_NODE:
1633 xmlOutputBufferWrite(
buf, 1,
"&");
1634 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
1635 xmlOutputBufferWrite(
buf, 1,
";");
1638 case XML_CDATA_SECTION_NODE:
1639 if (
cur->content ==
NULL || *
cur->content ==
'\0') {
1640 xmlOutputBufferWrite(
buf, 12,
"<![CDATA[]]>");
1643 while (*
end !=
'\0') {
1644 if (*
end ==
']' && *(
end + 1) ==
']' &&
1645 *(
end + 2) ==
'>') {
1647 xmlOutputBufferWrite(
buf, 9,
"<![CDATA[");
1649 (
const char *)
start);
1650 xmlOutputBufferWrite(
buf, 3,
"]]>");
1656 xmlOutputBufferWrite(
buf, 9,
"<![CDATA[");
1657 xmlOutputBufferWriteString(
buf, (
const char *)
start);
1658 xmlOutputBufferWrite(
buf, 3,
"]]>");
1663 case XML_ATTRIBUTE_NODE:
1664 xmlAttrDumpOutput(ctxt, (xmlAttrPtr)
cur);
1674 if (ctxt->format == 1)
1675 xmlOutputBufferWrite(
buf, 1,
"\n");
1685 if (
cur->type == XML_ELEMENT_NODE) {
1686 if (ctxt->level > 0) ctxt->level--;
1687 if ((xmlIndentTreeOutput) && (ctxt->format == 1))
1688 xmlOutputBufferWrite(
buf, ctxt->indent_size *
1689 (ctxt->level > ctxt->indent_nr ?
1690 ctxt->indent_nr : ctxt->level),
1693 xmlOutputBufferWrite(
buf, 2,
"</");
1695 xmlOutputBufferWriteString(
buf,
1696 (
const char *)
cur->ns->prefix);
1697 xmlOutputBufferWrite(
buf, 1,
":");
1700 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
1701 xmlOutputBufferWrite(
buf, 1,
">");
1703 if (
cur == unformattedNode) {
1705 unformattedNode =
NULL;
1731xmlSaveToFd(
int fd,
const char *encoding,
int options)
1737 ret->buf = xmlOutputBufferCreateFd(
fd,
ret->handler);
1740 xmlFreeSaveCtxt(
ret);
1759xmlSaveToFilename(
const char *
filename,
const char *encoding,
int options)
1770 xmlFreeSaveCtxt(
ret);
1789xmlSaveToBuffer(xmlBufferPtr
buffer,
const char *encoding,
int options)
1795 ret->buf = xmlOutputBufferCreateBuffer(
buffer,
ret->handler);
1798 xmlFreeSaveCtxt(
ret);
1818xmlSaveToIO(xmlOutputWriteCallback iowrite,
1819 xmlOutputCloseCallback ioclose,
1820 void *ioctx,
const char *encoding,
int options)
1826 ret->buf = xmlOutputBufferCreateIO(iowrite, ioclose, ioctx,
ret->handler);
1829 xmlFreeSaveCtxt(
ret);
1847xmlSaveDoc(xmlSaveCtxtPtr ctxt, xmlDocPtr doc)
1851 if ((ctxt ==
NULL) || (doc ==
NULL))
return(-1);
1852 if (xmlDocContentDumpOutput(ctxt, doc) < 0)
1869xmlSaveTree(xmlSaveCtxtPtr ctxt, xmlNodePtr
cur)
1874#ifdef LIBXML_HTML_ENABLED
1875 if (ctxt->options & XML_SAVE_XHTML) {
1876 xhtmlNodeDumpOutput(ctxt,
cur);
1879 if (((
cur->type != XML_NAMESPACE_DECL) && (
cur->doc !=
NULL) &&
1880 (
cur->doc->type == XML_HTML_DOCUMENT_NODE) &&
1881 ((ctxt->options & XML_SAVE_AS_XML) == 0)) ||
1882 (ctxt->options & XML_SAVE_AS_HTML)) {
1883 htmlNodeDumpOutputInternal(ctxt,
cur);
1887 xmlNodeDumpOutputInternal(ctxt,
cur);
1901xmlSaveFlush(xmlSaveCtxtPtr ctxt)
1903 if (ctxt ==
NULL)
return(-1);
1904 if (ctxt->buf ==
NULL)
return(-1);
1905 return(xmlOutputBufferFlush(ctxt->buf));
1918xmlSaveClose(xmlSaveCtxtPtr ctxt)
1922 if (ctxt ==
NULL)
return(-1);
1923 ret = xmlSaveFlush(ctxt);
1924 xmlFreeSaveCtxt(ctxt);
1940 if (ctxt ==
NULL)
return(-1);
1957 if (ctxt ==
NULL)
return(-1);
1958 ctxt->escapeAttr =
escape;
1978xmlBufAttrSerializeTxtContent(xmlBufPtr
buf, xmlDocPtr doc,
1993 }
else if (*
cur ==
'\r') {
1999 }
else if (*
cur ==
'\t') {
2005 }
else if (*
cur ==
'"') {
2011 }
else if (*
cur ==
'<') {
2017 }
else if (*
cur ==
'>') {
2023 }
else if (*
cur ==
'&') {
2029 }
else if ((*
cur >= 0x80) && (
cur[1] != 0) &&
2030 ((doc ==
NULL) || (doc->encoding ==
NULL))) {
2034 unsigned char tmp[12];
2041 xmlSerializeHexCharRef(tmp, *
cur);
2046 }
else if (*
cur < 0xE0) {
2051 }
else if ((*
cur < 0xF0) && (
cur [2] != 0)) {
2058 }
else if ((*
cur < 0xF8) && (
cur [2] != 0) && (
cur[3] != 0)) {
2070 xmlSerializeHexCharRef(tmp, *
cur);
2080 xmlSerializeHexCharRef(tmp,
val);
2102xmlAttrSerializeTxtContent(xmlBufferPtr
buf, xmlDocPtr doc,
2112 xmlBufAttrSerializeTxtContent(
buffer, doc,
attr,
string);
2133xmlNodeDump(xmlBufferPtr
buf, xmlDocPtr doc, xmlNodePtr
cur,
int level,
2168xmlBufNodeDump(xmlBufPtr
buf, xmlDocPtr doc, xmlNodePtr
cur,
int level,
2173 xmlOutputBufferPtr outbuf;
2184 outbuf = (xmlOutputBufferPtr)
xmlMalloc(
sizeof(xmlOutputBuffer));
2185 if (outbuf ==
NULL) {
2186 xmlSaveErrMemory(
"creating buffer");
2189 memset(outbuf, 0, (
size_t)
sizeof(xmlOutputBuffer));
2190 outbuf->buffer =
buf;
2191 outbuf->encoder =
NULL;
2192 outbuf->writecallback =
NULL;
2193 outbuf->closecallback =
NULL;
2194 outbuf->context =
NULL;
2195 outbuf->written = 0;
2216xmlElemDump(
FILE *
f, xmlDocPtr doc, xmlNodePtr
cur)
2218 xmlOutputBufferPtr outbuf;
2226 outbuf = xmlOutputBufferCreateFile(
f,
NULL);
2229 if ((doc !=
NULL) && (doc->type == XML_HTML_DOCUMENT_NODE)) {
2230#ifdef LIBXML_HTML_ENABLED
2231 htmlNodeDumpOutput(outbuf, doc,
cur,
NULL);
2236 xmlNodeDumpOutput(outbuf, doc,
cur, 0, 1,
NULL);
2237 xmlOutputBufferClose(outbuf);
2260xmlNodeDumpOutput(xmlOutputBufferPtr
buf, xmlDocPtr doc, xmlNodePtr
cur,
2264#ifdef LIBXML_HTML_ENABLED
2275 if (encoding ==
NULL)
2278 memset(&ctxt, 0,
sizeof(ctxt));
2281 ctxt.format =
format ? 1 : 0;
2282 ctxt.encoding = (
const xmlChar *) encoding;
2283 xmlSaveCtxtInit(&ctxt);
2284 ctxt.options |= XML_SAVE_AS_XML;
2286#ifdef LIBXML_HTML_ENABLED
2287 dtd = xmlGetIntSubset(doc);
2289 is_xhtml = xmlIsXHTML(dtd->SystemID, dtd->ExternalID);
2295 xhtmlNodeDumpOutput(&ctxt,
cur);
2298 xmlNodeDumpOutputInternal(&ctxt,
cur);
2317xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
xmlChar **doc_txt_ptr,
2318 int * doc_txt_len,
const char * txt_encoding,
2322 xmlOutputBufferPtr out_buff =
NULL;
2325 if (doc_txt_len ==
NULL) {
2326 doc_txt_len = &
dummy;
2329 if (doc_txt_ptr ==
NULL) {
2334 *doc_txt_ptr =
NULL;
2337 if (out_doc ==
NULL) {
2347 if (txt_encoding ==
NULL)
2348 txt_encoding = (
const char *) out_doc->encoding;
2349 if (txt_encoding !=
NULL) {
2351 if ( conv_hdlr ==
NULL ) {
2358 if ((out_buff = xmlAllocOutputBuffer(conv_hdlr)) ==
NULL ) {
2359 xmlSaveErrMemory(
"creating buffer");
2364 memset(&ctxt, 0,
sizeof(ctxt));
2365 ctxt.buf = out_buff;
2367 ctxt.format =
format ? 1 : 0;
2368 ctxt.encoding = (
const xmlChar *) txt_encoding;
2369 xmlSaveCtxtInit(&ctxt);
2370 ctxt.options |= XML_SAVE_AS_XML;
2371 xmlDocContentDumpOutput(&ctxt, out_doc);
2372 xmlOutputBufferFlush(out_buff);
2373 if (out_buff->conv !=
NULL) {
2374 *doc_txt_len =
xmlBufUse(out_buff->conv);
2377 *doc_txt_len =
xmlBufUse(out_buff->buffer);
2380 (
void)xmlOutputBufferClose(out_buff);
2382 if ((*doc_txt_ptr ==
NULL) && (*doc_txt_len > 0)) {
2384 xmlSaveErrMemory(
"creating output");
2437xmlDocDumpMemoryEnc(xmlDocPtr out_doc,
xmlChar **doc_txt_ptr,
2438 int * doc_txt_len,
const char * txt_encoding) {
2439 xmlDocDumpFormatMemoryEnc(out_doc, doc_txt_ptr, doc_txt_len,
2458 xmlOutputBufferPtr
buf;
2459 const char * encoding;
2466 encoding = (
const char *)
cur->encoding;
2478 memset(&ctxt, 0,
sizeof(ctxt));
2481 ctxt.format =
format ? 1 : 0;
2482 ctxt.encoding = (
const xmlChar *) encoding;
2483 xmlSaveCtxtInit(&ctxt);
2484 ctxt.options |= XML_SAVE_AS_XML;
2485 xmlDocContentDumpOutput(&ctxt,
cur);
2487 ret = xmlOutputBufferClose(
buf);
2501xmlDocDump(
FILE *
f, xmlDocPtr
cur) {
2502 return(xmlDocFormatDump (
f,
cur, 0));
2518xmlSaveFileTo(xmlOutputBufferPtr
buf, xmlDocPtr
cur,
const char *encoding) {
2524 xmlOutputBufferClose(
buf);
2527 memset(&ctxt, 0,
sizeof(ctxt));
2531 ctxt.encoding = (
const xmlChar *) encoding;
2532 xmlSaveCtxtInit(&ctxt);
2533 ctxt.options |= XML_SAVE_AS_XML;
2534 xmlDocContentDumpOutput(&ctxt,
cur);
2535 ret = xmlOutputBufferClose(
buf);
2553xmlSaveFormatFileTo(xmlOutputBufferPtr
buf, xmlDocPtr
cur,
2554 const char *encoding,
int format)
2561 ((
cur->type != XML_DOCUMENT_NODE) &&
2562 (
cur->type != XML_HTML_DOCUMENT_NODE))) {
2563 xmlOutputBufferClose(
buf);
2566 memset(&ctxt, 0,
sizeof(ctxt));
2569 ctxt.format =
format ? 1 : 0;
2570 ctxt.encoding = (
const xmlChar *) encoding;
2571 xmlSaveCtxtInit(&ctxt);
2572 ctxt.options |= XML_SAVE_AS_XML;
2573 xmlDocContentDumpOutput(&ctxt,
cur);
2574 ret = xmlOutputBufferClose(
buf);
2592xmlSaveFormatFileEnc(
const char *
filename, xmlDocPtr
cur,
2593 const char * encoding,
int format ) {
2595 xmlOutputBufferPtr
buf;
2602 if (encoding ==
NULL)
2603 encoding = (
const char *)
cur->encoding;
2612#ifdef LIBXML_ZLIB_ENABLED
2613 if (
cur->compression < 0)
cur->compression = xmlGetCompressMode();
2620 memset(&ctxt, 0,
sizeof(ctxt));
2623 ctxt.format =
format ? 1 : 0;
2624 ctxt.encoding = (
const xmlChar *) encoding;
2625 xmlSaveCtxtInit(&ctxt);
2626 ctxt.options |= XML_SAVE_AS_XML;
2628 xmlDocContentDumpOutput(&ctxt,
cur);
2630 ret = xmlOutputBufferClose(
buf);
2646xmlSaveFileEnc(
const char *
filename, xmlDocPtr
cur,
const char *encoding) {
2647 return ( xmlSaveFormatFileEnc(
filename,
cur, encoding, 0 ) );
_In_ fcb _In_ chunk _In_ uint64_t _In_ uint64_t _In_ bool _In_opt_ void _In_opt_ PIRP _In_ LIST_ENTRY _In_ uint8_t compression
xmlBufPtr xmlBufFromBuffer(xmlBufferPtr buffer)
int xmlBufGetAllocationScheme(xmlBufPtr buf)
void xmlBufFree(xmlBufPtr buf)
xmlBufPtr xmlBufCreate(void)
int xmlBufMergeBuffer(xmlBufPtr buf, xmlBufferPtr buffer)
xmlChar * xmlBufContent(const xmlBuf *buf)
int xmlBufSetAllocationScheme(xmlBufPtr buf, xmlBufferAllocationScheme scheme)
int xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string)
xmlBufferPtr xmlBufBackToBuffer(xmlBufPtr buf)
size_t xmlBufUse(const xmlBufPtr buf)
int xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len)
static const WCHAR indent[]
UINT(* handler)(MSIPACKAGE *)
XML_HIDDEN int xmlCharEncOutput(xmlOutputBufferPtr output, int init)
xmlCharEncodingHandlerPtr xmlFindCharEncodingHandler(const char *name)
xmlCharEncoding xmlParseCharEncoding(const char *name)
int(* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen, const unsigned char *in, int *inlen)
@ XML_CHAR_ENCODING_ASCII
XMLPUBFUN int xmlCharEncCloseFunc(xmlCharEncodingHandler *handler)
GLuint GLuint GLsizei GLenum type
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
#define memcpy(s1, s2, n)
XMLPUBVAR const xmlChar xmlStringTextNoenc[]
XMLPUBVAR const xmlChar xmlStringText[]
void * xmlGenericErrorContext
xmlGenericErrorFunc xmlGenericError
XML_GLOBALS_PARSER XMLPUBFUN void xmlInitParser(void)
XML_HIDDEN void XML_HIDDEN void __xmlSimpleError(int domain, int code, struct _xmlNode *node, const char *msg, const char *extra) LIBXML_ATTR_FORMAT(4
static const WCHAR lang[]
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
@ XML_SAVE_UNKNOWN_ENCODING
XMLPUBFUN xmlChar * xmlStrndup(const xmlChar *cur, int len)
XMLPUBFUN int xmlStrlen(const xmlChar *str)
XMLPUBFUN int xmlStrcasecmp(const xmlChar *str1, const xmlChar *str2)
XMLPUBFUN int xmlStrEqual(const xmlChar *str1, const xmlChar *str2)
XMLPUBFUN xmlChar * xmlStrdup(const xmlChar *cur)