Lines Matching refs:cur
592 xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur);
594 static void xmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur);
595 static void xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur);
596 void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
597 static int xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur);
632 xmlNsDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur, xmlSaveCtxtPtr ctxt) { in xmlNsDumpOutput() argument
633 if ((cur == NULL) || (buf == NULL)) return; in xmlNsDumpOutput()
634 if ((cur->type == XML_LOCAL_NAMESPACE) && (cur->href != NULL)) { in xmlNsDumpOutput()
635 if (xmlStrEqual(cur->prefix, BAD_CAST "xml")) in xmlNsDumpOutput()
644 if (cur->prefix != NULL) { in xmlNsDumpOutput()
646 xmlOutputBufferWriteString(buf, (const char *)cur->prefix); in xmlNsDumpOutput()
650 xmlBufWriteQuotedString(buf->buffer, cur->href); in xmlNsDumpOutput()
663 xmlNsDumpOutputCtxt(xmlSaveCtxtPtr ctxt, xmlNsPtr cur) { in xmlNsDumpOutputCtxt() argument
664 xmlNsDumpOutput(ctxt->buf, cur, ctxt); in xmlNsDumpOutputCtxt()
676 xmlNsListDumpOutputCtxt(xmlSaveCtxtPtr ctxt, xmlNsPtr cur) { in xmlNsListDumpOutputCtxt() argument
677 while (cur != NULL) { in xmlNsListDumpOutputCtxt()
678 xmlNsDumpOutput(ctxt->buf, cur, ctxt); in xmlNsListDumpOutputCtxt()
679 cur = cur->next; in xmlNsListDumpOutputCtxt()
692 xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur) { in xmlNsListDumpOutput() argument
693 while (cur != NULL) { in xmlNsListDumpOutput()
694 xmlNsDumpOutput(buf, cur, NULL); in xmlNsListDumpOutput()
695 cur = cur->next; in xmlNsListDumpOutput()
764 xmlAttrDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) { in xmlAttrDumpOutput() argument
767 if (cur == NULL) return; in xmlAttrDumpOutput()
774 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in xmlAttrDumpOutput()
775 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in xmlAttrDumpOutput()
778 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xmlAttrDumpOutput()
780 xmlAttrSerializeContent(buf, cur); in xmlAttrDumpOutput()
794 xmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) { in xmlAttrListDumpOutput() argument
795 if (cur == NULL) return; in xmlAttrListDumpOutput()
796 while (cur != NULL) { in xmlAttrListDumpOutput()
797 xmlAttrDumpOutput(ctxt, cur); in xmlAttrListDumpOutput()
798 cur = cur->next; in xmlAttrListDumpOutput()
811 xmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { in xmlNodeListDumpOutput() argument
814 if (cur == NULL) return; in xmlNodeListDumpOutput()
816 while (cur != NULL) { in xmlNodeListDumpOutput()
818 ((cur->type == XML_ELEMENT_NODE) || in xmlNodeListDumpOutput()
819 (cur->type == XML_COMMENT_NODE) || in xmlNodeListDumpOutput()
820 (cur->type == XML_PI_NODE))) in xmlNodeListDumpOutput()
825 xmlNodeDumpOutputInternal(ctxt, cur); in xmlNodeListDumpOutput()
829 cur = cur->next; in xmlNodeListDumpOutput()
841 htmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { in htmlNodeDumpOutputInternal() argument
851 doc = cur->doc; in htmlNodeDumpOutputInternal()
876 htmlNodeDumpFormatOutput(buf, doc, cur, in htmlNodeDumpOutputInternal()
879 htmlNodeDumpFormatOutput(buf, doc, cur, in htmlNodeDumpOutputInternal()
900 xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { in xmlNodeDumpOutputInternal() argument
906 if (cur == NULL) return; in xmlNodeDumpOutputInternal()
908 if (cur->type == XML_XINCLUDE_START) in xmlNodeDumpOutputInternal()
910 if (cur->type == XML_XINCLUDE_END) in xmlNodeDumpOutputInternal()
912 if ((cur->type == XML_DOCUMENT_NODE) || in xmlNodeDumpOutputInternal()
913 (cur->type == XML_HTML_DOCUMENT_NODE)) { in xmlNodeDumpOutputInternal()
914 xmlDocContentDumpOutput(ctxt, (xmlDocPtr) cur); in xmlNodeDumpOutputInternal()
919 xhtmlNodeDumpOutput(ctxt, cur); in xmlNodeDumpOutputInternal()
922 if (((cur->type != XML_NAMESPACE_DECL) && (cur->doc != NULL) && in xmlNodeDumpOutputInternal()
923 (cur->doc->type == XML_HTML_DOCUMENT_NODE) && in xmlNodeDumpOutputInternal()
926 htmlNodeDumpOutputInternal(ctxt, cur); in xmlNodeDumpOutputInternal()
930 if (cur->type == XML_DTD_NODE) { in xmlNodeDumpOutputInternal()
931 xmlDtdDumpOutput(ctxt, (xmlDtdPtr) cur); in xmlNodeDumpOutputInternal()
934 if (cur->type == XML_DOCUMENT_FRAG_NODE) { in xmlNodeDumpOutputInternal()
935 xmlNodeListDumpOutput(ctxt, cur->children); in xmlNodeDumpOutputInternal()
938 if (cur->type == XML_ELEMENT_DECL) { in xmlNodeDumpOutputInternal()
939 xmlBufDumpElementDecl(buf->buffer, (xmlElementPtr) cur); in xmlNodeDumpOutputInternal()
942 if (cur->type == XML_ATTRIBUTE_DECL) { in xmlNodeDumpOutputInternal()
943 xmlBufDumpAttributeDecl(buf->buffer, (xmlAttributePtr) cur); in xmlNodeDumpOutputInternal()
946 if (cur->type == XML_ENTITY_DECL) { in xmlNodeDumpOutputInternal()
947 xmlBufDumpEntityDecl(buf->buffer, (xmlEntityPtr) cur); in xmlNodeDumpOutputInternal()
950 if (cur->type == XML_TEXT_NODE) { in xmlNodeDumpOutputInternal()
951 if (cur->content != NULL) { in xmlNodeDumpOutputInternal()
952 if (cur->name != xmlStringTextNoenc) { in xmlNodeDumpOutputInternal()
953 xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape); in xmlNodeDumpOutputInternal()
958 xmlOutputBufferWriteString(buf, (const char *) cur->content); in xmlNodeDumpOutputInternal()
964 if (cur->type == XML_PI_NODE) { in xmlNodeDumpOutputInternal()
965 if (cur->content != NULL) { in xmlNodeDumpOutputInternal()
967 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xmlNodeDumpOutputInternal()
968 if (cur->content != NULL) { in xmlNodeDumpOutputInternal()
973 xmlOutputBufferWriteString(buf, (const char *)cur->content); in xmlNodeDumpOutputInternal()
978 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xmlNodeDumpOutputInternal()
985 if (cur->type == XML_COMMENT_NODE) { in xmlNodeDumpOutputInternal()
986 if (cur->content != NULL) { in xmlNodeDumpOutputInternal()
988 xmlOutputBufferWriteString(buf, (const char *)cur->content); in xmlNodeDumpOutputInternal()
993 if (cur->type == XML_ENTITY_REF_NODE) { in xmlNodeDumpOutputInternal()
995 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xmlNodeDumpOutputInternal()
999 if (cur->type == XML_CDATA_SECTION_NODE) { in xmlNodeDumpOutputInternal()
1000 if (cur->content == NULL || *cur->content == '\0') { in xmlNodeDumpOutputInternal()
1003 start = end = cur->content; in xmlNodeDumpOutputInternal()
1023 if (cur->type == XML_ATTRIBUTE_NODE) { in xmlNodeDumpOutputInternal()
1024 xmlAttrDumpOutput(ctxt, (xmlAttrPtr) cur); in xmlNodeDumpOutputInternal()
1027 if (cur->type == XML_NAMESPACE_DECL) { in xmlNodeDumpOutputInternal()
1028 xmlNsDumpOutputCtxt(ctxt, (xmlNsPtr) cur); in xmlNodeDumpOutputInternal()
1034 tmp = cur->children; in xmlNodeDumpOutputInternal()
1046 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in xmlNodeDumpOutputInternal()
1047 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in xmlNodeDumpOutputInternal()
1051 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xmlNodeDumpOutputInternal()
1052 if (cur->nsDef) in xmlNodeDumpOutputInternal()
1053 xmlNsListDumpOutputCtxt(ctxt, cur->nsDef); in xmlNodeDumpOutputInternal()
1054 if (cur->properties != NULL) in xmlNodeDumpOutputInternal()
1055 xmlAttrListDumpOutput(ctxt, cur->properties); in xmlNodeDumpOutputInternal()
1057 if (((cur->type == XML_ELEMENT_NODE) || (cur->content == NULL)) && in xmlNodeDumpOutputInternal()
1058 (cur->children == NULL) && ((ctxt->options & XML_SAVE_NO_EMPTY) == 0)) { in xmlNodeDumpOutputInternal()
1068 if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) { in xmlNodeDumpOutputInternal()
1069 xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape); in xmlNodeDumpOutputInternal()
1071 if (cur->children != NULL) { in xmlNodeDumpOutputInternal()
1074 xmlNodeListDumpOutput(ctxt, cur->children); in xmlNodeDumpOutputInternal()
1083 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in xmlNodeDumpOutputInternal()
1084 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in xmlNodeDumpOutputInternal()
1088 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xmlNodeDumpOutputInternal()
1102 xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur) { in xmlDocContentDumpOutput() argument
1107 const xmlChar *oldenc = cur->encoding; in xmlDocContentDumpOutput()
1118 if ((cur->type != XML_HTML_DOCUMENT_NODE) && in xmlDocContentDumpOutput()
1119 (cur->type != XML_DOCUMENT_NODE)) in xmlDocContentDumpOutput()
1123 cur->encoding = BAD_CAST ctxt->encoding; in xmlDocContentDumpOutput()
1124 } else if (cur->encoding != NULL) { in xmlDocContentDumpOutput()
1125 encoding = cur->encoding; in xmlDocContentDumpOutput()
1128 if (((cur->type == XML_HTML_DOCUMENT_NODE) && in xmlDocContentDumpOutput()
1134 htmlSetMetaEncoding(cur, (const xmlChar *) encoding); in xmlDocContentDumpOutput()
1136 encoding = htmlGetMetaEncoding(cur); in xmlDocContentDumpOutput()
1142 cur->encoding = oldenc; in xmlDocContentDumpOutput()
1147 htmlDocContentDumpFormatOutput(buf, cur, in xmlDocContentDumpOutput()
1150 htmlDocContentDumpFormatOutput(buf, cur, in xmlDocContentDumpOutput()
1153 cur->encoding = oldenc; in xmlDocContentDumpOutput()
1158 } else if ((cur->type == XML_DOCUMENT_NODE) || in xmlDocContentDumpOutput()
1174 cur->encoding = oldenc; in xmlDocContentDumpOutput()
1191 if (cur->version != NULL) in xmlDocContentDumpOutput()
1192 xmlBufWriteQuotedString(buf->buffer, cur->version); in xmlDocContentDumpOutput()
1199 switch (cur->standalone) { in xmlDocContentDumpOutput()
1214 dtd = xmlGetIntSubset(cur); in xmlDocContentDumpOutput()
1221 if (cur->children != NULL) { in xmlDocContentDumpOutput()
1222 xmlNodePtr child = cur->children; in xmlDocContentDumpOutput()
1246 cur->encoding = oldenc; in xmlDocContentDumpOutput()
1331 xhtmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) { in xhtmlAttrListDumpOutput() argument
1339 if (cur == NULL) return; in xhtmlAttrListDumpOutput()
1341 parent = cur->parent; in xhtmlAttrListDumpOutput()
1342 while (cur != NULL) { in xhtmlAttrListDumpOutput()
1343 if ((cur->ns == NULL) && (xmlStrEqual(cur->name, BAD_CAST "id"))) in xhtmlAttrListDumpOutput()
1344 id = cur; in xhtmlAttrListDumpOutput()
1346 if ((cur->ns == NULL) && (xmlStrEqual(cur->name, BAD_CAST "name"))) in xhtmlAttrListDumpOutput()
1347 name = cur; in xhtmlAttrListDumpOutput()
1349 if ((cur->ns == NULL) && (xmlStrEqual(cur->name, BAD_CAST "lang"))) in xhtmlAttrListDumpOutput()
1350 lang = cur; in xhtmlAttrListDumpOutput()
1352 if ((cur->ns != NULL) && (xmlStrEqual(cur->name, BAD_CAST "lang")) && in xhtmlAttrListDumpOutput()
1353 (xmlStrEqual(cur->ns->prefix, BAD_CAST "xml"))) in xhtmlAttrListDumpOutput()
1354 xml_lang = cur; in xhtmlAttrListDumpOutput()
1355 else if ((cur->ns == NULL) && in xhtmlAttrListDumpOutput()
1356 ((cur->children == NULL) || in xhtmlAttrListDumpOutput()
1357 (cur->children->content == NULL) || in xhtmlAttrListDumpOutput()
1358 (cur->children->content[0] == 0)) && in xhtmlAttrListDumpOutput()
1359 (htmlIsBooleanAttr(cur->name))) { in xhtmlAttrListDumpOutput()
1360 if (cur->children != NULL) in xhtmlAttrListDumpOutput()
1361 xmlFreeNode(cur->children); in xhtmlAttrListDumpOutput()
1362 cur->children = xmlNewText(cur->name); in xhtmlAttrListDumpOutput()
1363 if (cur->children != NULL) in xhtmlAttrListDumpOutput()
1364 cur->children->parent = (xmlNodePtr) cur; in xhtmlAttrListDumpOutput()
1366 xmlAttrDumpOutput(ctxt, cur); in xhtmlAttrListDumpOutput()
1367 cur = cur->next; in xhtmlAttrListDumpOutput()
1417 xhtmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { in xhtmlNodeListDumpOutput() argument
1420 if (cur == NULL) return; in xhtmlNodeListDumpOutput()
1422 while (cur != NULL) { in xhtmlNodeListDumpOutput()
1424 (cur->type == XML_ELEMENT_NODE)) in xhtmlNodeListDumpOutput()
1429 xhtmlNodeDumpOutput(ctxt, cur); in xhtmlNodeListDumpOutput()
1433 cur = cur->next; in xhtmlNodeListDumpOutput()
1449 xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { in xhtmlNodeDumpOutput() argument
1455 if (cur == NULL) return; in xhtmlNodeDumpOutput()
1456 if ((cur->type == XML_DOCUMENT_NODE) || in xhtmlNodeDumpOutput()
1457 (cur->type == XML_HTML_DOCUMENT_NODE)) { in xhtmlNodeDumpOutput()
1458 xmlDocContentDumpOutput(ctxt, (xmlDocPtr) cur); in xhtmlNodeDumpOutput()
1461 if (cur->type == XML_XINCLUDE_START) in xhtmlNodeDumpOutput()
1463 if (cur->type == XML_XINCLUDE_END) in xhtmlNodeDumpOutput()
1465 if (cur->type == XML_NAMESPACE_DECL) { in xhtmlNodeDumpOutput()
1466 xmlNsDumpOutputCtxt(ctxt, (xmlNsPtr) cur); in xhtmlNodeDumpOutput()
1469 if (cur->type == XML_DTD_NODE) { in xhtmlNodeDumpOutput()
1470 xmlDtdDumpOutput(ctxt, (xmlDtdPtr) cur); in xhtmlNodeDumpOutput()
1473 if (cur->type == XML_DOCUMENT_FRAG_NODE) { in xhtmlNodeDumpOutput()
1474 xhtmlNodeListDumpOutput(ctxt, cur->children); in xhtmlNodeDumpOutput()
1478 if (cur->type == XML_ELEMENT_DECL) { in xhtmlNodeDumpOutput()
1479 xmlBufDumpElementDecl(buf->buffer, (xmlElementPtr) cur); in xhtmlNodeDumpOutput()
1482 if (cur->type == XML_ATTRIBUTE_DECL) { in xhtmlNodeDumpOutput()
1483 xmlBufDumpAttributeDecl(buf->buffer, (xmlAttributePtr) cur); in xhtmlNodeDumpOutput()
1486 if (cur->type == XML_ENTITY_DECL) { in xhtmlNodeDumpOutput()
1487 xmlBufDumpEntityDecl(buf->buffer, (xmlEntityPtr) cur); in xhtmlNodeDumpOutput()
1490 if (cur->type == XML_TEXT_NODE) { in xhtmlNodeDumpOutput()
1491 if (cur->content != NULL) { in xhtmlNodeDumpOutput()
1492 if ((cur->name == xmlStringText) || in xhtmlNodeDumpOutput()
1493 (cur->name != xmlStringTextNoenc)) { in xhtmlNodeDumpOutput()
1494 xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape); in xhtmlNodeDumpOutput()
1499 xmlOutputBufferWriteString(buf, (const char *) cur->content); in xhtmlNodeDumpOutput()
1505 if (cur->type == XML_PI_NODE) { in xhtmlNodeDumpOutput()
1506 if (cur->content != NULL) { in xhtmlNodeDumpOutput()
1508 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xhtmlNodeDumpOutput()
1509 if (cur->content != NULL) { in xhtmlNodeDumpOutput()
1511 xmlOutputBufferWriteString(buf, (const char *)cur->content); in xhtmlNodeDumpOutput()
1516 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xhtmlNodeDumpOutput()
1521 if (cur->type == XML_COMMENT_NODE) { in xhtmlNodeDumpOutput()
1522 if (cur->content != NULL) { in xhtmlNodeDumpOutput()
1524 xmlOutputBufferWriteString(buf, (const char *)cur->content); in xhtmlNodeDumpOutput()
1529 if (cur->type == XML_ENTITY_REF_NODE) { in xhtmlNodeDumpOutput()
1531 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xhtmlNodeDumpOutput()
1535 if (cur->type == XML_CDATA_SECTION_NODE) { in xhtmlNodeDumpOutput()
1536 if (cur->content == NULL || *cur->content == '\0') { in xhtmlNodeDumpOutput()
1539 start = end = cur->content; in xhtmlNodeDumpOutput()
1558 if (cur->type == XML_ATTRIBUTE_NODE) { in xhtmlNodeDumpOutput()
1559 xmlAttrDumpOutput(ctxt, (xmlAttrPtr) cur); in xhtmlNodeDumpOutput()
1565 tmp = cur->children; in xhtmlNodeDumpOutput()
1576 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in xhtmlNodeDumpOutput()
1577 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in xhtmlNodeDumpOutput()
1581 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xhtmlNodeDumpOutput()
1582 if (cur->nsDef) in xhtmlNodeDumpOutput()
1583 xmlNsListDumpOutputCtxt(ctxt, cur->nsDef); in xhtmlNodeDumpOutput()
1584 if ((xmlStrEqual(cur->name, BAD_CAST "html") && in xhtmlNodeDumpOutput()
1585 (cur->ns == NULL) && (cur->nsDef == NULL))) { in xhtmlNodeDumpOutput()
1592 if (cur->properties != NULL) in xhtmlNodeDumpOutput()
1593 xhtmlAttrListDumpOutput(ctxt, cur->properties); in xhtmlNodeDumpOutput()
1595 if ((cur->type == XML_ELEMENT_NODE) && in xhtmlNodeDumpOutput()
1596 (cur->parent != NULL) && in xhtmlNodeDumpOutput()
1597 (cur->parent->parent == (xmlNodePtr) cur->doc) && in xhtmlNodeDumpOutput()
1598 xmlStrEqual(cur->name, BAD_CAST"head") && in xhtmlNodeDumpOutput()
1599 xmlStrEqual(cur->parent->name, BAD_CAST"html")) { in xhtmlNodeDumpOutput()
1601 tmp = cur->children; in xhtmlNodeDumpOutput()
1621 if ((cur->type == XML_ELEMENT_NODE) && (cur->children == NULL)) { in xhtmlNodeDumpOutput()
1622 if (((cur->ns == NULL) || (cur->ns->prefix == NULL)) && in xhtmlNodeDumpOutput()
1623 ((xhtmlIsEmpty(cur) == 1) && (addmeta == 0))) { in xhtmlNodeDumpOutput()
1655 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in xhtmlNodeDumpOutput()
1656 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in xhtmlNodeDumpOutput()
1659 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xhtmlNodeDumpOutput()
1682 if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) { in xhtmlNodeDumpOutput()
1683 xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape); in xhtmlNodeDumpOutput()
1694 if ((cur->type == XML_ELEMENT_NODE) && in xhtmlNodeDumpOutput()
1695 ((xmlStrEqual(cur->name, BAD_CAST "script")) || in xhtmlNodeDumpOutput()
1696 (xmlStrEqual(cur->name, BAD_CAST "style"))) && in xhtmlNodeDumpOutput()
1697 ((cur->ns == NULL) || in xhtmlNodeDumpOutput()
1698 (xmlStrEqual(cur->ns->href, XHTML_NS_NAME)))) { in xhtmlNodeDumpOutput()
1699 xmlNodePtr child = cur->children; in xhtmlNodeDumpOutput()
1758 if (cur->children != NULL) { in xhtmlNodeDumpOutput()
1764 xhtmlNodeListDumpOutput(ctxt, cur->children); in xhtmlNodeDumpOutput()
1774 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in xhtmlNodeDumpOutput()
1775 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in xhtmlNodeDumpOutput()
1779 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xhtmlNodeDumpOutput()
2049 xmlChar *base, *cur; in xmlBufAttrSerializeTxtContent() local
2053 base = cur = (xmlChar *) string; in xmlBufAttrSerializeTxtContent()
2054 while (*cur != 0) { in xmlBufAttrSerializeTxtContent()
2055 if (*cur == '\n') { in xmlBufAttrSerializeTxtContent()
2056 if (base != cur) in xmlBufAttrSerializeTxtContent()
2057 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2059 cur++; in xmlBufAttrSerializeTxtContent()
2060 base = cur; in xmlBufAttrSerializeTxtContent()
2061 } else if (*cur == '\r') { in xmlBufAttrSerializeTxtContent()
2062 if (base != cur) in xmlBufAttrSerializeTxtContent()
2063 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2065 cur++; in xmlBufAttrSerializeTxtContent()
2066 base = cur; in xmlBufAttrSerializeTxtContent()
2067 } else if (*cur == '\t') { in xmlBufAttrSerializeTxtContent()
2068 if (base != cur) in xmlBufAttrSerializeTxtContent()
2069 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2071 cur++; in xmlBufAttrSerializeTxtContent()
2072 base = cur; in xmlBufAttrSerializeTxtContent()
2073 } else if (*cur == '"') { in xmlBufAttrSerializeTxtContent()
2074 if (base != cur) in xmlBufAttrSerializeTxtContent()
2075 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2077 cur++; in xmlBufAttrSerializeTxtContent()
2078 base = cur; in xmlBufAttrSerializeTxtContent()
2079 } else if (*cur == '<') { in xmlBufAttrSerializeTxtContent()
2080 if (base != cur) in xmlBufAttrSerializeTxtContent()
2081 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2083 cur++; in xmlBufAttrSerializeTxtContent()
2084 base = cur; in xmlBufAttrSerializeTxtContent()
2085 } else if (*cur == '>') { in xmlBufAttrSerializeTxtContent()
2086 if (base != cur) in xmlBufAttrSerializeTxtContent()
2087 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2089 cur++; in xmlBufAttrSerializeTxtContent()
2090 base = cur; in xmlBufAttrSerializeTxtContent()
2091 } else if (*cur == '&') { in xmlBufAttrSerializeTxtContent()
2092 if (base != cur) in xmlBufAttrSerializeTxtContent()
2093 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2095 cur++; in xmlBufAttrSerializeTxtContent()
2096 base = cur; in xmlBufAttrSerializeTxtContent()
2097 } else if ((*cur >= 0x80) && (cur[1] != 0) && in xmlBufAttrSerializeTxtContent()
2105 if (base != cur) in xmlBufAttrSerializeTxtContent()
2106 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2107 if (*cur < 0xC0) { in xmlBufAttrSerializeTxtContent()
2109 xmlSerializeHexCharRef(tmp, *cur); in xmlBufAttrSerializeTxtContent()
2111 cur++; in xmlBufAttrSerializeTxtContent()
2112 base = cur; in xmlBufAttrSerializeTxtContent()
2114 } else if (*cur < 0xE0) { in xmlBufAttrSerializeTxtContent()
2115 val = (cur[0]) & 0x1F; in xmlBufAttrSerializeTxtContent()
2117 val |= (cur[1]) & 0x3F; in xmlBufAttrSerializeTxtContent()
2119 } else if ((*cur < 0xF0) && (cur [2] != 0)) { in xmlBufAttrSerializeTxtContent()
2120 val = (cur[0]) & 0x0F; in xmlBufAttrSerializeTxtContent()
2122 val |= (cur[1]) & 0x3F; in xmlBufAttrSerializeTxtContent()
2124 val |= (cur[2]) & 0x3F; in xmlBufAttrSerializeTxtContent()
2126 } else if ((*cur < 0xF8) && (cur [2] != 0) && (cur[3] != 0)) { in xmlBufAttrSerializeTxtContent()
2127 val = (cur[0]) & 0x07; in xmlBufAttrSerializeTxtContent()
2129 val |= (cur[1]) & 0x3F; in xmlBufAttrSerializeTxtContent()
2131 val |= (cur[2]) & 0x3F; in xmlBufAttrSerializeTxtContent()
2133 val |= (cur[3]) & 0x3F; in xmlBufAttrSerializeTxtContent()
2138 xmlSerializeHexCharRef(tmp, *cur); in xmlBufAttrSerializeTxtContent()
2140 cur++; in xmlBufAttrSerializeTxtContent()
2141 base = cur; in xmlBufAttrSerializeTxtContent()
2150 cur += l; in xmlBufAttrSerializeTxtContent()
2151 base = cur; in xmlBufAttrSerializeTxtContent()
2153 cur++; in xmlBufAttrSerializeTxtContent()
2156 if (base != cur) in xmlBufAttrSerializeTxtContent()
2157 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2201 xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, in xmlNodeDump() argument
2207 if ((buf == NULL) || (cur == NULL)) in xmlNodeDump()
2212 ret = xmlBufNodeDump(buffer, doc, cur, level, format); in xmlNodeDump()
2236 xmlBufNodeDump(xmlBufPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, in xmlBufNodeDump() argument
2246 if (cur == NULL) { in xmlBufNodeDump()
2276 xmlNodeDumpOutput(outbuf, doc, cur, level, format, NULL); in xmlBufNodeDump()
2292 xmlElemDump(FILE * f, xmlDocPtr doc, xmlNodePtr cur) in xmlElemDump() argument
2298 if (cur == NULL) { in xmlElemDump()
2317 htmlNodeDumpOutput(outbuf, doc, cur, NULL); in xmlElemDump()
2319 xmlSaveErr(XML_ERR_INTERNAL_ERROR, cur, "HTML support not compiled in\n"); in xmlElemDump()
2322 xmlNodeDumpOutput(outbuf, doc, cur, 0, 1, NULL); in xmlElemDump()
2346 xmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, in xmlNodeDumpOutput() argument
2357 if ((buf == NULL) || (cur == NULL)) return; in xmlNodeDumpOutput()
2380 xhtmlNodeDumpOutput(&ctxt, cur); in xmlNodeDumpOutput()
2383 xmlNodeDumpOutputInternal(&ctxt, cur); in xmlNodeDumpOutput()
2487 xmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) { in xmlDocDumpMemory() argument
2488 xmlDocDumpFormatMemoryEnc(cur, mem, size, NULL, 0); in xmlDocDumpMemory()
2505 xmlDocDumpFormatMemory(xmlDocPtr cur, xmlChar**mem, int *size, int format) { in xmlDocDumpFormatMemory() argument
2506 xmlDocDumpFormatMemoryEnc(cur, mem, size, NULL, format); in xmlDocDumpFormatMemory()
2541 xmlDocFormatDump(FILE *f, xmlDocPtr cur, int format) { in xmlDocFormatDump() argument
2548 if (cur == NULL) { in xmlDocFormatDump()
2555 encoding = (const char *) cur->encoding; in xmlDocFormatDump()
2560 xmlFree((char *) cur->encoding); in xmlDocFormatDump()
2561 cur->encoding = NULL; in xmlDocFormatDump()
2568 ctxt.doc = cur; in xmlDocFormatDump()
2575 xmlDocContentDumpOutput(&ctxt, cur); in xmlDocFormatDump()
2591 xmlDocDump(FILE *f, xmlDocPtr cur) { in xmlDocDump() argument
2592 return(xmlDocFormatDump (f, cur, 0)); in xmlDocDump()
2608 xmlSaveFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding) { in xmlSaveFileTo() argument
2613 if (cur == NULL) { in xmlSaveFileTo()
2618 ctxt.doc = cur; in xmlSaveFileTo()
2625 xmlDocContentDumpOutput(&ctxt, cur); in xmlSaveFileTo()
2644 xmlSaveFormatFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, in xmlSaveFormatFileTo() argument
2651 if ((cur == NULL) || in xmlSaveFormatFileTo()
2652 ((cur->type != XML_DOCUMENT_NODE) && in xmlSaveFormatFileTo()
2653 (cur->type != XML_HTML_DOCUMENT_NODE))) { in xmlSaveFormatFileTo()
2658 ctxt.doc = cur; in xmlSaveFormatFileTo()
2665 xmlDocContentDumpOutput(&ctxt, cur); in xmlSaveFormatFileTo()
2684 xmlSaveFormatFileEnc( const char * filename, xmlDocPtr cur, in xmlSaveFormatFileEnc() argument
2691 if (cur == NULL) in xmlSaveFormatFileEnc()
2695 encoding = (const char *) cur->encoding; in xmlSaveFormatFileEnc()
2705 if (cur->compression < 0) cur->compression = xmlGetCompressMode(); in xmlSaveFormatFileEnc()
2710 buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression); in xmlSaveFormatFileEnc()
2713 ctxt.doc = cur; in xmlSaveFormatFileEnc()
2721 xmlDocContentDumpOutput(&ctxt, cur); in xmlSaveFormatFileEnc()
2739 xmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding) { in xmlSaveFileEnc() argument
2740 return ( xmlSaveFormatFileEnc( filename, cur, encoding, 0 ) ); in xmlSaveFileEnc()
2758 xmlSaveFormatFile(const char *filename, xmlDocPtr cur, int format) { in xmlSaveFormatFile() argument
2759 return ( xmlSaveFormatFileEnc( filename, cur, NULL, format ) ); in xmlSaveFormatFile()
2773 xmlSaveFile(const char *filename, xmlDocPtr cur) { in xmlSaveFile() argument
2774 return(xmlSaveFormatFileEnc(filename, cur, NULL, 0)); in xmlSaveFile()