HTML Tidy  5.9.15
The HTACG Tidy HTML Project
Document Parse

Detailed Description

Functions for parsing markup from a given input source, as well as string and filename functions for added convenience.

HTML/XHTML version determined from input.

Functions

int TIDY_CALL tidyParseBuffer (TidyDoc tdoc, TidyBuffer *buf)
 Parse markup in given buffer. More...
 
int TIDY_CALL tidyParseFile (TidyDoc tdoc, ctmbstr filename)
 Parse markup in named file. More...
 
int TIDY_CALL tidyParseSource (TidyDoc tdoc, TidyInputSource *source)
 Parse markup in given generic input source. More...
 
int TIDY_CALL tidyParseStdin (TidyDoc tdoc)
 Parse markup from the standard input. More...
 
int TIDY_CALL tidyParseString (TidyDoc tdoc, ctmbstr content)
 Parse markup in given string. More...
 

Function Documentation

◆ tidyParseBuffer()

int TIDY_CALL tidyParseBuffer ( TidyDoc  tdoc,
TidyBuffer *  buf 
)

Parse markup in given buffer.

Returns
Returns the highest of 2 indicating that errors were present in the document, 1 indicating warnings, and 0 in the case of everything being okay.
Parameters
tdocThe tidy document to use for parsing.
bufThe TidyBuffer containing data to parse.

◆ tidyParseFile()

int TIDY_CALL tidyParseFile ( TidyDoc  tdoc,
ctmbstr  filename 
)

Parse markup in named file.

Returns
Returns the highest of 2 indicating that errors were present in the document, 1 indicating warnings, and 0 in the case of everything being okay.
Parameters
tdocThe tidy document to use for parsing.
filenameThe filename to parse.

◆ tidyParseSource()

int TIDY_CALL tidyParseSource ( TidyDoc  tdoc,
TidyInputSource source 
)

Parse markup in given generic input source.

Returns
Returns the highest of 2 indicating that errors were present in the document, 1 indicating warnings, and 0 in the case of everything being okay.
Parameters
tdocThe tidy document to use for parsing.
sourceA TidyInputSource containing data to parse.

◆ tidyParseStdin()

int TIDY_CALL tidyParseStdin ( TidyDoc  tdoc)

Parse markup from the standard input.

Parameters
tdocThe tidy document to use for parsing.
Returns
Returns the highest of 2 indicating that errors were present in the document, 1 indicating warnings, and 0 in the case of everything being okay.

◆ tidyParseString()

int TIDY_CALL tidyParseString ( TidyDoc  tdoc,
ctmbstr  content 
)

Parse markup in given string.

Note that the supplied string is of type ctmbstr based on char and therefore doesn't support the use of UTF-16 strings. Use tidyParseBuffer() if parsing multibyte strings.

Returns
Returns the highest of 2 indicating that errors were present in the document, 1 indicating warnings, and 0 in the case of everything being okay.
Parameters
tdocThe tidy document to use for parsing.
contentThe string to parse.