| Gnome XML Library Reference Manual | |||
|---|---|---|---|
| <<< Previous Page | Home | Up | Next Page >>> |
#define HTML_TEXT_NODE #define HTML_ENTITY_REF_NODE #define HTML_COMMENT_NODE #define HTML_PRESERVE_NODE htmlDocPtr htmlNewDoc (const xmlChar *URI, const xmlChar *ExternalID); htmlDocPtr htmlNewDocNoDtD (const xmlChar *URI, const xmlChar *ExternalID); const xmlChar* htmlGetMetaEncoding (htmlDocPtr doc); int htmlSetMetaEncoding (htmlDocPtr doc, const xmlChar *encoding); void htmlDocDumpMemory (xmlDocPtr cur, xmlChar **mem, int *size); int htmlDocDump ( |
htmlDocPtr htmlNewDoc (const xmlChar *URI, const xmlChar *ExternalID); |
| URI : | URI for the dtd, or NULL |
| ExternalID : | the external ID of the DTD, or NULL |
| Returns : | a new document |
htmlDocPtr htmlNewDocNoDtD (const xmlChar *URI, const xmlChar *ExternalID); |
| URI : | URI for the dtd, or NULL |
| ExternalID : | the external ID of the DTD, or NULL |
| Returns : | a new document, do not intialize the DTD if not provided |
const xmlChar* htmlGetMetaEncoding (htmlDocPtr doc); |
Encoding definition lookup in the Meta tags
| doc : | the document |
| Returns : | the current encoding as flagged in the HTML source |
int htmlSetMetaEncoding (htmlDocPtr doc, const xmlChar *encoding); |
Sets the current encoding in the Meta tags NOTE: this will not change the document content encoding, just the META flag associated.
| doc : | the document |
| encoding : | the encoding string |
| Returns : | 0 in case of success and -1 in case of error |
void htmlDocDumpMemory (xmlDocPtr cur, xmlChar **mem, int *size); |
Dump an HTML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory.
| cur : | the document |
| mem : | OUT: the memory pointer |
| size : | OUT: the memory lenght |
int htmlDocDump ( |
Dump an HTML document to an open FILE.
| f : | the FILE* |
| cur : | the document |
| Returns : | the number of byte written or -1 in case of failure. |
int htmlSaveFile (const char *filename,
xmlDocPtr cur); |
Dump an HTML document to a file. If filename is "-" the stdout file is used.
| filename : | the filename (or URL) |
| cur : | the document |
| Returns : | the number of byte written or -1 in case of failure. |
void htmlNodeDump (xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur); |
Dump an HTML node, recursive behaviour,children are printed too.
| buf : | the HTML buffer output |
| doc : | the document |
| cur : | the current node |
void htmlNodeDumpFile ( |
Dump an HTML node, recursive behaviour,children are printed too.
| out : | the FILE pointer |
| doc : | the document |
| cur : | the current node |
int htmlSaveFileEnc (const char *filename,
xmlDocPtr cur,
const char *encoding); |
Dump an HTML document to a file using a given encoding.
| filename : | the filename |
| cur : | the document |
| encoding : | |
| Returns : | the number of byte written or -1 in case of failure. |