Blame doc/devhelp/libxml2-HTMLtree.html

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

Packit Service a31ea6
      HTMLtree
Packit Service a31ea6
    
Packit Service a31ea6
    

HTMLtree - specific APIs to process HTML tree, especially serialization

Packit Service a31ea6
    

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

Packit Service a31ea6
    

Author(s): Daniel Veillard

Packit Service a31ea6
    
Packit Service a31ea6
      

Synopsis

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

Description

Packit Service a31ea6
    
Packit Service a31ea6
    
Packit Service a31ea6
      

Details

Packit Service a31ea6
      
Packit Service a31ea6
        

Macro HTML_COMMENT_NODE

#define HTML_COMMENT_NODE;
Packit Service a31ea6

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

Packit Service a31ea6
Packit Service a31ea6
        
Packit Service a31ea6
        

Macro HTML_ENTITY_REF_NODE

#define HTML_ENTITY_REF_NODE;
Packit Service a31ea6

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

Packit Service a31ea6
Packit Service a31ea6
        
Packit Service a31ea6
        

Macro HTML_PI_NODE

#define HTML_PI_NODE;
Packit Service a31ea6

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

Packit Service a31ea6
Packit Service a31ea6
        
Packit Service a31ea6
        

Macro HTML_PRESERVE_NODE

#define HTML_PRESERVE_NODE;
Packit Service a31ea6

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

Packit Service a31ea6
Packit Service a31ea6
        
Packit Service a31ea6
        

Macro HTML_TEXT_NODE

#define HTML_TEXT_NODE;
Packit Service a31ea6

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

Packit Service a31ea6
Packit Service a31ea6
        
Packit Service a31ea6
        
Packit Service a31ea6

Dump an HTML document.

Packit Service a31ea6
<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 Service a31ea6
        
Packit Service a31ea6
        
Packit Service a31ea6

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

Packit Service a31ea6
<tt>buf</tt>:the HTML buffer output
<tt>cur</tt>:the document
<tt>encoding</tt>:the encoding string
Packit Service a31ea6
        
Packit Service a31ea6
        
Packit Service a31ea6

Dump an HTML document to an open FILE.

Packit Service a31ea6
<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 Service a31ea6
        
Packit Service a31ea6
        
Packit Service a31ea6

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 Service a31ea6
<tt>cur</tt>:the document
<tt>mem</tt>:OUT: the memory pointer
<tt>size</tt>:OUT: the memory length
Packit Service a31ea6
        
Packit Service a31ea6
        
Packit Service a31ea6

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 Service a31ea6
<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 Service a31ea6
        
Packit Service a31ea6
        
Packit Service a31ea6

Encoding definition lookup in the Meta tags

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

Determine if a given attribute is a boolean attribute.

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

htmlNewDoc ()

htmlDocPtr	htmlNewDoc		(const xmlChar * URI, 
const xmlChar * ExternalID)
Packit Service a31ea6

Creates a new HTML document

Packit Service a31ea6
<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 Service a31ea6
        
Packit Service a31ea6
        

htmlNewDocNoDtD ()

htmlDocPtr	htmlNewDocNoDtD		(const xmlChar * URI, 
const xmlChar * ExternalID)
Packit Service a31ea6

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

Packit Service a31ea6
<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 Service a31ea6
        
Packit Service a31ea6
        
Packit Service a31ea6

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

Packit Service a31ea6
<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 Service a31ea6
        
Packit Service a31ea6
        
Packit Service a31ea6

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

Packit Service a31ea6
<tt>out</tt>:the FILE pointer
<tt>doc</tt>:the document
<tt>cur</tt>:the current node
Packit Service a31ea6
        
Packit Service a31ea6
        
Packit Service a31ea6

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

Packit Service a31ea6
<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 Service a31ea6
        
Packit Service a31ea6
        
Packit Service a31ea6

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

Packit Service a31ea6
<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 Service a31ea6
        
Packit Service a31ea6
        
Packit Service a31ea6

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

Packit Service a31ea6
<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 Service a31ea6
        
Packit Service a31ea6
        
Packit Service a31ea6

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

Packit Service a31ea6
<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 Service a31ea6
        
Packit Service a31ea6
        
Packit Service a31ea6

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

Packit Service a31ea6
<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 Service a31ea6
        
Packit Service a31ea6
        
Packit Service a31ea6

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

Packit Service a31ea6
<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 Service a31ea6
        
Packit Service a31ea6
        
Packit Service a31ea6

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

Packit Service a31ea6
<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 Service a31ea6
        
Packit Service a31ea6
      
Packit Service a31ea6
    
Packit Service a31ea6
  </body>
Packit Service a31ea6
</html>