* htmlDocContentDumpFormatOutput: * @buf: the HTML buffer output * @cur: the document * @encoding: the encoding string * @format: should formatting spaces been added * * Dump an HTML document. */
| 965 | * Dump an HTML document. |
| 966 | */ |
| 967 | void |
| 968 | htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr cur, |
| 969 | const char *encoding, int format) { |
| 970 | int type; |
| 971 | |
| 972 | xmlInitParser(); |
| 973 | |
| 974 | if ((buf == NULL) || (cur == NULL)) |
| 975 | return; |
| 976 | |
| 977 | /* |
| 978 | * force to output the stuff as HTML, especially for entities |
| 979 | */ |
| 980 | type = cur->type; |
| 981 | cur->type = XML_HTML_DOCUMENT_NODE; |
| 982 | if (cur->intSubset != NULL) { |
| 983 | htmlDtdDumpOutput(buf, cur, NULL); |
| 984 | } |
| 985 | if (cur->children != NULL) { |
| 986 | htmlNodeListDumpOutput(buf, cur, cur->children, encoding, format); |
| 987 | } |
| 988 | xmlOutputBufferWriteString(buf, "\n"); |
| 989 | cur->type = (xmlElementType) type; |
| 990 | } |
| 991 | |
| 992 | /** |
| 993 | * htmlDocContentDumpOutput: |