xhtml文件怎么转换html,c# – 如何将HTML转换为XHTML?

Convert from HTML to XML with HTML Tidy

JRoppert,对于你的需要,我想你可能想看看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 , -o write output to the specified

-config set configuration options from the specified

-file , -f write errors to the specified

-modify, -m modify the original input files

Processing directives

---------------------

-indent, -i indent element content

-wrap , -w wrap text at the specified . 0 is assumed if

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 do additional accessibility checks ( = 0, 1, 2, 3).

0 is assumed if 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 set the two-letter language code (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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值