▼External Public API | The Public API is the API that LibTidy programmers must access in order to harness HTML Tidy as a library. The API limits all exposure to internal structures and provides only accessors that return simple types such as C strings and integers, which makes it quite suitable for integration with any number of other languages |
Basic Operations | For an excellent example of how to invoke LibTidy, please consult console/tidy.c:main() for in-depth implementation details. A simplified example can be seen on our site: http://www.html-tidy.org/developer/ |
Configuration Options | Functions for getting and setting Tidy configuration options |
Diagnostics and Repair | After parsing the document, you can use these functions to attempt cleanup, repair, get additional diagnostics, and determine the document type |
Document Parse | 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 |
Document Save Functions | Save currently parsed document to the given output sink. File name and string/buffer functions provided for convenience |
Document Tree | A parsed (and optionally repaired) document is represented by Tidy as a tree, much like a W3C DOM. This tree may be traversed using these functions. The following snippet gives a basic idea how these functions can be used |
I/O and Messages | Tidy provides flexible I/O. By default, Tidy will define, create and use instances of input and output handlers for standard C buffered I/O (i.e., FILE* stdin , FILE* stdout , and FILE* stderr for content input, content output and diagnostic output, respectively. A FILE* cfgFile input handler will be used for config files. Command line options will just be set directly |
Localization Support | These functions help manage localization in Tidy |
Memory Allocation | Tidy can use a user-provided allocator for all memory allocations. If this allocator is not provided, then a default allocator is used which simply wraps standard C malloc()/free() calls. These wrappers call the panic() function upon any failure. The default panic function prints an out of memory message to stderr, and calls exit(2) |
Message Key Management | These functions serve to manage message codes, i.e., codes that are used Tidy and communicated via its callback filters to represent reports and dialogue that Tidy emits |
Opaque Types | Instances of these types are returned by LibTidy API functions, however they are opaque; you cannot see into them, and must use accessor functions to access the contents. This ensures that interfacing to LibTidy remains as universal as possible |
Public Enumerations | |
▼Internal API | The Internal API is used exclusively within LibTidy. If you are an HTML Tidy developer, then the internals API will be of especial importance to you |
Configuration Options | This module organizes all of Tidy's configuration options, including picklist management, option setting and retrieval, option file utilities, and so on |
HTML Tags | This module organizes all of Tidy's HTML tag operations, such as parsing tags, defining tags, and user-defined tags |
HTML and XML Parsing | These functions and structures form the internal API for document parsing |
Key Discovery | LibTidy users may want to use TidyReportCallback to enable their own localization lookup features. Because Tidy's report codes are enums the specific values can change over time. Using these functions provides the ability for LibTidy users to use LibTidy's enum values as strings for lookup purposes |
Message Creation and Releasing | |
Message Muting | Message types included in the mute option will be be printed in messageOut() |
Report Arguments Interrogation API | |
Report and Dialogue API | |
Report and Dialogue Writing Functions | These simple functions perform the vast majority of Tidy's output, and one these should be your first choice when adding your own output |
Tidy Release Information | These functions return information about the current release version date and version number. Note that the latest release date or the highest version number alone do not guarantee the latest Tidy release, as we may backport important fixes to older releases of Tidy |
Tidy Strings Generation Macros | |
▼Tidy Console Application | |
CLI Options Utilities | These structures, arrays, declarations, and definitions are used throughout this console application |
Configuration Options Utilities | Provide utilities to manipulate configuration options for output |
Experimental Stuff | From time to time the developers might leave stuff here that you can use to experiment on their own, or that they're using to experiment with |
Main | Let's do something here! |
Miscellaneous Utilities | This group contains general utilities used in the console application |
Output Helping Functions | This group functions that aid the formatting of output |
Provide the -export-config Services | |
Provide the -help Service | |
Provide the -help-config Service | |
Provide the -help-env Service | |
Provide the -help-option Service | |
Provide the -lang help Service | |
Provide the -show-config Service | |
Provide the -version Service | |
Provide the -xml-config Service | |
Provide the -xml-error-strings Service | |
Provide the -xml-help Service | |
Provide the -xml-options-strings Service | |
Provide the -xml-strings Service | |