12#ifdef LIBXML_HTML_ENABLED
45htmlGetMetaEncoding(htmlDocPtr doc) {
162 char newcontent[100];
174 snprintf(newcontent,
sizeof(newcontent),
"text/html; charset=%s",
176 newcontent[
sizeof(newcontent) - 1] = 0;
274 xmlAddPrevSibling(
head->children, meta);
302static const char*
const htmlBooleanAttrs[] = {
303 "checked",
"compact",
"declare",
"defer",
"disabled",
"ismap",
304 "multiple",
"nohref",
"noresize",
"noshade",
"nowrap",
"readonly",
322 while (htmlBooleanAttrs[
i] !=
NULL) {
330#ifdef LIBXML_OUTPUT_ENABLED
348htmlSaveErrMemory(
const char *
extra)
368 msg =
"string is not in UTF-8\n";
371 msg =
"invalid character value\n";
374 msg =
"unknown encoding %s\n";
377 msg =
"HTML has no DOCTYPE\n";
380 msg =
"unexpected error number\n";
416 if (outbuf ==
NULL) {
417 htmlSaveErrMemory(
"allocating HTML output buffer");
421 outbuf->buffer =
buf;
422 outbuf->encoder =
NULL;
423 outbuf->writecallback =
NULL;
424 outbuf->closecallback =
NULL;
425 outbuf->context =
NULL;
518 ret = xmlOutputBufferClose(
buf);
533 htmlNodeDumpFileFormat(
out, doc,
cur,
NULL, 1);
562 encoding = (
const char *) htmlGetMetaEncoding(
cur);
593 xmlOutputBufferFlush(
buf);
601 (
void)xmlOutputBufferClose(
buf);
646 xmlOutputBufferWriteString(
buf,
"<!DOCTYPE ");
647 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
649 xmlOutputBufferWriteString(
buf,
" PUBLIC ");
652 xmlOutputBufferWriteString(
buf,
" ");
655 }
else if (
cur->SystemID !=
NULL &&
657 xmlOutputBufferWriteString(
buf,
" SYSTEM ");
660 xmlOutputBufferWriteString(
buf,
">\n");
685 xmlOutputBufferWriteString(
buf,
" ");
687 xmlOutputBufferWriteString(
buf, (
const char *)
cur->ns->prefix);
688 xmlOutputBufferWriteString(
buf,
":");
690 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
691 if ((
cur->children !=
NULL) && (!htmlIsBooleanAttr(
cur->name))) {
694 xmlOutputBufferWriteString(
buf,
"=");
712 if (escaped !=
NULL) {
723 xmlOutputBufferWriteString(
buf,
"=\"\"");
744 const htmlElemDesc *
info;
769 xmlOutputBufferWriteString(
buf,
"\n");
788 info = htmlTagLookup(
cur->name);
792 xmlOutputBufferWriteString(
buf,
"<");
794 xmlOutputBufferWriteString(
buf, (
const char *)
cur->ns->prefix);
795 xmlOutputBufferWriteString(
buf,
":");
797 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
799 xmlNsListDumpOutput(
buf,
cur->nsDef);
802 htmlAttrDumpOutput(
buf, doc,
attr);
807 xmlOutputBufferWriteString(
buf,
">");
808 }
else if (
cur->children ==
NULL) {
812 xmlOutputBufferWriteString(
buf,
">");
814 xmlOutputBufferWriteString(
buf,
"></");
816 xmlOutputBufferWriteString(
buf,
817 (
const char *)
cur->ns->prefix);
818 xmlOutputBufferWriteString(
buf,
":");
820 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
821 xmlOutputBufferWriteString(
buf,
">");
824 xmlOutputBufferWriteString(
buf,
">");
826 (
cur->children->type != HTML_TEXT_NODE) &&
827 (
cur->children->type != HTML_ENTITY_REF_NODE) &&
828 (
cur->children !=
cur->last) &&
830 (
cur->name[0] !=
'p'))
831 xmlOutputBufferWriteString(
buf,
"\n");
839 if ((
cur->next->type != HTML_TEXT_NODE) &&
840 (
cur->next->type != HTML_ENTITY_REF_NODE) &&
844 xmlOutputBufferWriteString(
buf,
"\n");
865 xmlOutputBufferWriteString(
buf, (
const char *)
buffer);
869 xmlOutputBufferWriteString(
buf, (
const char *)
cur->content);
873 case HTML_COMMENT_NODE:
875 xmlOutputBufferWriteString(
buf,
"<!--");
876 xmlOutputBufferWriteString(
buf, (
const char *)
cur->content);
877 xmlOutputBufferWriteString(
buf,
"-->");
883 xmlOutputBufferWriteString(
buf,
"<?");
884 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
886 xmlOutputBufferWriteString(
buf,
" ");
887 xmlOutputBufferWriteString(
buf,
888 (
const char *)
cur->content);
890 xmlOutputBufferWriteString(
buf,
">");
894 case HTML_ENTITY_REF_NODE:
895 xmlOutputBufferWriteString(
buf,
"&");
896 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
897 xmlOutputBufferWriteString(
buf,
";");
900 case HTML_PRESERVE_NODE:
902 xmlOutputBufferWriteString(
buf, (
const char *)
cur->content);
924 xmlOutputBufferWriteString(
buf,
"\n");
927 info = htmlTagLookup(
cur->name);
932 (
cur->last->type != HTML_TEXT_NODE) &&
933 (
cur->last->type != HTML_ENTITY_REF_NODE) &&
934 (
cur->children !=
cur->last) &&
936 (
cur->name[0] !=
'p'))
937 xmlOutputBufferWriteString(
buf,
"\n");
939 xmlOutputBufferWriteString(
buf,
"</");
941 xmlOutputBufferWriteString(
buf, (
const char *)
cur->ns->prefix);
942 xmlOutputBufferWriteString(
buf,
":");
944 xmlOutputBufferWriteString(
buf, (
const char *)
cur->name);
945 xmlOutputBufferWriteString(
buf,
">");
949 if ((
cur->next->type != HTML_TEXT_NODE) &&
950 (
cur->next->type != HTML_ENTITY_REF_NODE) &&
954 xmlOutputBufferWriteString(
buf,
"\n");
974 htmlNodeDumpFormatOutput(
buf, doc,
cur,
NULL, 1);
1042 encoding = (
const char *) htmlGetMetaEncoding(
cur);
1067 ret = xmlOutputBufferClose(
buf);
1092 encoding = (
const char *) htmlGetMetaEncoding(
cur);
1121 ret = xmlOutputBufferClose(
buf);
1159 htmlSetMetaEncoding(
cur, (
const xmlChar *)
"UTF-8");
1178 ret = xmlOutputBufferClose(
buf);
struct outqueuenode * head
xmlBufPtr xmlBufFromBuffer(xmlBufferPtr buffer)
int xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string)
xmlBufferPtr xmlBufBackToBuffer(xmlBufPtr buf)
UINT(* handler)(MSIPACKAGE *)
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL xmlFindCharEncodingHandler(const char *name)
XMLPUBFUN xmlCharEncoding XMLCALL xmlParseCharEncoding(const char *name)
XMLPUBFUN xmlChar *XMLCALL xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input)
GLuint GLuint GLsizei GLenum type
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
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
static const struct access_res create[16]
XMLPUBVAR const xmlChar xmlStringTextNoenc[]
XMLPUBVAR const xmlChar xmlStringText[]
XMLPUBVAR xmlMallocFunc xmlMalloc
XMLPUBVAR xmlFreeFunc xmlFree
XMLPUBFUN void XMLCALL xmlInitParser(void)
XMLPUBFUN xmlNodePtr XMLCALL xmlAddChild(xmlNodePtr parent, xmlNodePtr cur)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocNode(xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content)
xmlOutputBuffer * xmlOutputBufferPtr
XMLPUBFUN size_t XMLCALL xmlBufUse(const xmlBufPtr buf)
struct _xmlOutputBuffer xmlOutputBuffer
XMLPUBFUN void XMLCALL xmlUnlinkNode(xmlNodePtr cur)
XMLPUBFUN void XMLCALL xmlFreeNode(xmlNodePtr cur)
XMLPUBFUN xmlChar *XMLCALL xmlBufContent(const xmlBuf *buf)
XMLPUBFUN xmlChar *XMLCALL xmlNodeListGetString(xmlDocPtr doc, const xmlNode *list, int inLine)
struct _xmlDtd * intSubset
XMLPUBFUN xmlChar *XMLCALL xmlURIEscapeStr(const xmlChar *str, const xmlChar *list)
@ XML_SAVE_UNKNOWN_ENCODING
XMLPUBFUN xmlChar *XMLCALL xmlStrndup(const xmlChar *cur, int len)
XMLPUBFUN int XMLCALL xmlStrcasecmp(const xmlChar *str1, const xmlChar *str2)
XMLPUBFUN const xmlChar *XMLCALL xmlStrstr(const xmlChar *str, const xmlChar *val)
XMLPUBFUN const xmlChar *XMLCALL xmlStrcasestr(const xmlChar *str, const xmlChar *val)
XMLPUBFUN int XMLCALL xmlStrEqual(const xmlChar *str1, const xmlChar *str2)
XMLPUBFUN int XMLCALL xmlStrcmp(const xmlChar *str1, const xmlChar *str2)