Blame doc/devhelp/libxml2-HTMLtree.html

Packit 423ecb
Packit 423ecb
<html>
Packit 423ecb
  <head>
Packit 423ecb
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
Packit 423ecb
    <title>HTMLtree: specific APIs to process HTML tree, especially serialization</title>
Packit 423ecb
    <meta name="generator" content="Libxml2 devhelp stylesheet"/>
Packit 423ecb
    <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
Packit 423ecb
    <link rel="up" href="general.html" title="API"/>
Packit 423ecb
    <link rel="stylesheet" href="style.css" type="text/css"/>
Packit 423ecb
    <link rel="chapter" href="general.html" title="API"/>
Packit 423ecb
  </head>
Packit 423ecb
  <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit 423ecb
    
Packit 423ecb
      
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Prev
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Up
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Home
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Next
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        libxml2 Reference Manual
Packit 423ecb
      
Packit 423ecb
    
Packit 423ecb
    

Packit 423ecb
      HTMLtree
Packit 423ecb
    
Packit 423ecb
    

HTMLtree - specific APIs to process HTML tree, especially serialization

Packit 423ecb
    

this module implements a few function needed to process tree in an HTML specific way.

Packit 423ecb
    

Author(s): Daniel Veillard

Packit 423ecb
    
Packit 423ecb
      

Synopsis

Packit 423ecb
      
#define HTML_ENTITY_REF_NODE;
Packit 423ecb
#define HTML_COMMENT_NODE;
Packit 423ecb
#define HTML_PRESERVE_NODE;
Packit 423ecb
#define HTML_TEXT_NODE;
Packit 423ecb
#define HTML_PI_NODE;
Packit 423ecb
int	htmlNodeDumpFileFormat		(FILE * out, 
xmlDocPtr doc,
xmlNodePtr cur,
const char * encoding,
int format);
Packit 423ecb
void	htmlDocDumpMemory		(xmlDocPtr cur, 
xmlChar ** mem,
int * size);
Packit 423ecb
int	htmlSaveFile			(const char * filename, 
xmlDocPtr cur);
Packit 423ecb
int	htmlDocDump			(FILE * f, 
xmlDocPtr cur);
Packit 423ecb
void	htmlDocDumpMemoryFormat		(xmlDocPtr cur, 
xmlChar ** mem,
int * size,
int format);
Packit 423ecb
int	htmlIsBooleanAttr		(const xmlChar * name);
Packit 423ecb
int	htmlSaveFileFormat		(const char * filename, 
xmlDocPtr cur,
const char * encoding,
int format);
Packit 423ecb
void	htmlNodeDumpFormatOutput	(xmlOutputBufferPtr buf, 
xmlDocPtr doc,
xmlNodePtr cur,
const char * encoding,
int format);
Packit 423ecb
int	htmlSetMetaEncoding		(htmlDocPtr doc, 
const xmlChar * encoding);
Packit 423ecb
int	htmlSaveFileEnc			(const char * filename, 
xmlDocPtr cur,
const char * encoding);
Packit 423ecb
void	htmlNodeDumpOutput		(xmlOutputBufferPtr buf, 
xmlDocPtr doc,
xmlNodePtr cur,
const char * encoding);
Packit 423ecb
int	htmlNodeDump			(xmlBufferPtr buf, 
xmlDocPtr doc,
xmlNodePtr cur);
Packit 423ecb
htmlDocPtr	htmlNewDoc		(const xmlChar * URI, 
const xmlChar * ExternalID);
Packit 423ecb
const xmlChar *	htmlGetMetaEncoding	(htmlDocPtr doc);
Packit 423ecb
void	htmlNodeDumpFile		(FILE * out, 
xmlDocPtr doc,
xmlNodePtr cur);
Packit 423ecb
void	htmlDocContentDumpFormatOutput	(xmlOutputBufferPtr buf, 
xmlDocPtr cur,
const char * encoding,
int format);
Packit 423ecb
htmlDocPtr	htmlNewDocNoDtD		(const xmlChar * URI, 
const xmlChar * ExternalID);
Packit 423ecb
void	htmlDocContentDumpOutput	(xmlOutputBufferPtr buf, 
xmlDocPtr cur,
const char * encoding);
Packit 423ecb
Packit 423ecb
    
Packit 423ecb
    
Packit 423ecb
      

Description

Packit 423ecb
    
Packit 423ecb
    
Packit 423ecb
      

Details

Packit 423ecb
      
Packit 423ecb
        

Macro HTML_COMMENT_NODE

#define HTML_COMMENT_NODE;
Packit 423ecb

Macro. A comment in a HTML document is really implemented the same way as a comment in an XML document.

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Macro HTML_ENTITY_REF_NODE

#define HTML_ENTITY_REF_NODE;
Packit 423ecb

Macro. An entity reference in a HTML document is really implemented the same way as an entity reference in an XML document.

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Macro HTML_PI_NODE

#define HTML_PI_NODE;
Packit 423ecb

Macro. A processing instruction in a HTML document is really implemented the same way as a processing instruction in an XML document.

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Macro HTML_PRESERVE_NODE

#define HTML_PRESERVE_NODE;
Packit 423ecb

Macro. A preserved node in a HTML document is really implemented the same way as a CDATA section in an XML document.

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Macro HTML_TEXT_NODE

#define HTML_TEXT_NODE;
Packit 423ecb

Macro. A text node in a HTML document is really implemented the same way as a text node in an XML document.

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Dump an HTML document.

Packit 423ecb
<tt>buf</tt>:the HTML buffer output
<tt>cur</tt>:the document
<tt>encoding</tt>:the encoding string
<tt>format</tt>:should formatting spaces been added
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Dump an HTML document. Formating return/spaces are added.

Packit 423ecb
<tt>buf</tt>:the HTML buffer output
<tt>cur</tt>:the document
<tt>encoding</tt>:the encoding string
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Dump an HTML document to an open FILE.

Packit 423ecb
<tt>f</tt>:the FILE*
<tt>cur</tt>:the document
<tt>Returns</tt>:the number of byte written or -1 in case of failure.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Dump an HTML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory.

Packit 423ecb
<tt>cur</tt>:the document
<tt>mem</tt>:OUT: the memory pointer
<tt>size</tt>:OUT: the memory length
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Dump an HTML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory.

Packit 423ecb
<tt>cur</tt>:the document
<tt>mem</tt>:OUT: the memory pointer
<tt>size</tt>:OUT: the memory length
<tt>format</tt>:should formatting spaces been added
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Encoding definition lookup in the Meta tags

Packit 423ecb
<tt>doc</tt>:the document
<tt>Returns</tt>:the current encoding as flagged in the HTML source
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Determine if a given attribute is a boolean attribute.

Packit 423ecb
<tt>name</tt>:the name of the attribute to check
<tt>Returns</tt>:false if the attribute is not boolean, true otherwise.
Packit 423ecb
        
Packit 423ecb
        

htmlNewDoc ()

htmlDocPtr	htmlNewDoc		(const xmlChar * URI, 
const xmlChar * ExternalID)
Packit 423ecb

Creates a new HTML document

Packit 423ecb
<tt>URI</tt>:URI for the dtd, or NULL
<tt>ExternalID</tt>:the external ID of the DTD, or NULL
<tt>Returns</tt>:a new document
Packit 423ecb
        
Packit 423ecb
        

htmlNewDocNoDtD ()

htmlDocPtr	htmlNewDocNoDtD		(const xmlChar * URI, 
const xmlChar * ExternalID)
Packit 423ecb

Creates a new HTML document without a DTD node if @URI and @ExternalID are NULL

Packit 423ecb
<tt>URI</tt>:URI for the dtd, or NULL
<tt>ExternalID</tt>:the external ID of the DTD, or NULL
<tt>Returns</tt>:a new document, do not initialize the DTD if not provided
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added.

Packit 423ecb
<tt>buf</tt>:the HTML buffer output
<tt>doc</tt>:the document
<tt>cur</tt>:the current node
<tt>Returns</tt>:the number of byte written or -1 in case of error
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added.

Packit 423ecb
<tt>out</tt>:the FILE pointer
<tt>doc</tt>:the document
<tt>cur</tt>:the current node
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Dump an HTML node, recursive behaviour,children are printed too. TODO: if encoding == NULL try to save in the doc encoding

Packit 423ecb
<tt>out</tt>:the FILE pointer
<tt>doc</tt>:the document
<tt>cur</tt>:the current node
<tt>encoding</tt>:the document encoding
<tt>format</tt>:should formatting spaces been added
<tt>Returns</tt>:the number of byte written or -1 in case of failure.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Dump an HTML node, recursive behaviour,children are printed too.

Packit 423ecb
<tt>buf</tt>:the HTML buffer output
<tt>doc</tt>:the document
<tt>cur</tt>:the current node
<tt>encoding</tt>:the encoding string
<tt>format</tt>:should formatting spaces been added
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Dump an HTML node, recursive behaviour,children are printed too, and formatting returns/spaces are added.

Packit 423ecb
<tt>buf</tt>:the HTML buffer output
<tt>doc</tt>:the document
<tt>cur</tt>:the current node
<tt>encoding</tt>:the encoding string
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Dump an HTML document to a file. If @filename is "-" the stdout file is used.

Packit 423ecb
<tt>filename</tt>:the filename (or URL)
<tt>cur</tt>:the document
<tt>Returns</tt>:the number of byte written or -1 in case of failure.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Dump an HTML document to a file using a given encoding and formatting returns/spaces are added.

Packit 423ecb
<tt>filename</tt>:the filename
<tt>cur</tt>:the document
<tt>encoding</tt>:the document encoding
<tt>Returns</tt>:the number of byte written or -1 in case of failure.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Dump an HTML document to a file using a given encoding.

Packit 423ecb
<tt>filename</tt>:the filename
<tt>cur</tt>:the document
<tt>encoding</tt>:the document encoding
<tt>format</tt>:should formatting spaces been added
<tt>Returns</tt>:the number of byte written or -1 in case of failure.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Sets the current encoding in the Meta tags NOTE: this will not change the document content encoding, just the META flag associated.

Packit 423ecb
<tt>doc</tt>:the document
<tt>encoding</tt>:the encoding string
<tt>Returns</tt>:0 in case of success and -1 in case of error
Packit 423ecb
        
Packit 423ecb
      
Packit 423ecb
    
Packit 423ecb
  </body>
Packit 423ecb
</html>