XHTMLTranscoder
| Name | XHTMLTranscoder |
| Version | 1.0.007 |
| Date | 2006-02-03 |
| Author | Nicola Asuni |
| Copyright | Tecnick.com S.r.l. Via Ugo Foscolo n.19 09045 Quartu Sant'Elena (CA) ITALY www.tecnick.com |
| License | GNU LESSER GENERAL PUBLIC LICENSE v.2.1 |
Source Code and Documentation
Description
XHTMLTranscoder is an Open Source Java class that quickly converts broken HTML code to well-formed XHTML.XHTMLTranscoder is a fast transcoder useful to convert HTML code in real-time.
This class do not check headers, it checks only the general rules for tags, attributes and nesting:
- tags (elements) names in lowercase (eg: <ACRONYM> become <acronym>);
- attributes names in lowercase (eg: <acronym TITLE="example"> become <acronym title="example">);
- unquoted attributes (eg: <acronym title=example> become <acronym title="example">);
- elements nesting (eg: <b><i>hello</b></i> become <b><i>hello</i></b>);
- elements termination (eg: <p>hello world ... become <p>hello world ...</p>);
- unminimized attributes (eg: <input type="checkbox" checked /> become <input type="checkbox" checked="checked" />);
- unterminated empty tags (eg: <br> become <br />);
- preserve other languages elements (php, asp, jsp, ...)
This project is shipped as Eclipse project, with classes compiled into the "classes" directory.
However a packaged version of this class is available as a JAR archive inside the www directory.
To install the JAR file, just copy it on your project classpath.
Documentation and examples are included on the distribution.
Download XHTMLTranscoder from SourceForge