"how to convert html to xhtml? [closed]" Code Answer

3

convert from html to xml with html tidy

downloadable binaries

jroppert, for your need, i guess you might want to look at the sources

c:temp>tidy -help
tidy [option...] [file...] [option...] [file...]
utility to clean up and pretty print html/xhtml/xml
see http://tidy.sourceforge.net/

options for html tidy for windows released on 14 february 2006:

file manipulation
-----------------
 -output <file>, -o  write output to the specified <file>
 <file>
 -config <file>      set configuration options from the specified <file>
 -file <file>, -f    write errors to the specified <file>
 <file>
 -modify, -m         modify the original input files

processing directives
---------------------
 -indent, -i         indent element content
 -wrap <column>, -w  wrap text at the specified <column>. 0 is assumed if
 <column>            <column> is missing. when this option is omitted, the
                     default of the configuration option "wrap" applies.
 -upper, -u          force tags to upper case
 -clean, -c          replace font, nobr and center tags by css
 -bare, -b           strip out smart quotes and em dashes, etc.
 -numeric, -n        output numeric rather than named entities
 -errors, -e         only show errors
 -quiet, -q          suppress nonessential output
 -omit               omit optional end tags
 -xml                specify the input is well formed xml
 -asxml, -asxhtml    convert html to well formed xhtml
 -ashtml             force xhtml to well formed html
 -access <level>     do additional accessibility checks (<level> = 0, 1, 2, 3).
                     0 is assumed if <level> is missing.

character encodings
-------------------
 -raw                output values above 127 without conversion to entities
 -ascii              use iso-8859-1 for input, us-ascii for output
 -latin0             use iso-8859-15 for input, us-ascii for output
 -latin1             use iso-8859-1 for both input and output
 -iso2022            use iso-2022 for both input and output
 -utf8               use utf-8 for both input and output
 -mac                use macroman for input, us-ascii for output
 -win1252            use windows-1252 for input, us-ascii for output
 -ibm858             use ibm-858 (cp850+euro) for input, us-ascii for output
 -utf16le            use utf-16le for both input and output
 -utf16be            use utf-16be for both input and output
 -utf16              use utf-16 for both input and output
 -big5               use big5 for both input and output
 -shiftjis           use shift_jis for both input and output
 -language <lang>    set the two-letter language code <lang> (for future use)

miscellaneous
-------------
 -version, -v        show the version of tidy
 -help, -h, -?       list the command line options
 -xml-help           list the command line options in xml format
 -help-config        list all configuration options
 -xml-config         list all configuration options in xml format
 -show-config        list the current configuration settings

use --blah blarg for any configuration option "blah" with argument "blarg"

input/output default to stdin/stdout respectively
single letter options apart from -f may be combined
as in:  tidy -f errs.txt -imu foo.html
for further info on html see http://www.w3.org/markup
By Shariful Islam on August 23 2022

Answers related to “how to convert html to xhtml? [closed]”

Only authorized users can answer the Search term. Please sign in first, or register a free account.