tidy java 编码_Tidy - 一个把HTML 转成XHTML的工具库[整理]

HTML, XHTML, XML Options Reference

add-xml-decl

Type: Boolean

Default: no

Example: y/n, yes/no, t/f, true/false, 1/0

This option specifies if Tidy should add the XML declaration when outputting XML or XHTML. Note that if the input already includes an <?xml ... ?> declaration then this option will be ignored. If the encoding for the output is different from "ascii", one of the utf encodings or "raw", the declaration is always added as required by the XML standard.

add-xml-space

Type: Boolean

Default: no

Example: y/n, yes/no, t/f, true/false, 1/0

This option specifies if Tidy should add xml:space="preserve" to elements such as

, 
". If set to "auto", the attributes of the inner
are moved to the outer one. As well, nested
with ID attributes are not merged. If set to "yes", the attributes of the inner
are discarded with the exception of "class" and "style".

merge-spans

Type: AutoBool

Default: auto

Example: auto, y/n, yes/no, t/f, true/false, 1/0

Can be used to modify behavior of -c (--clean yes) option. This option specifies if Tidy should merge nested such as "...". The algorithm is identical to the one used by --merge-divs.

ncr

Type: Boolean

Default: yes

Example: y/n, yes/no, t/f, true/false, 1/0

This option specifies if Tidy should allow numeric character references.

new-blocklevel-tags

Type: Tag names

Default: -

Example: tagX, tagY, ...

This option specifies new block-level tags. This option takes a space or comma separated list of tag names. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. Note you can't change the content model for elements such as

  • ,
  1. and

new-empty-tags

Type: Tag names

Default: -

Example: tagX, tagY, ...

This option specifies new empty inline tags. This option takes a space or comma separated list of tag names. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. Remember to also declare empty tags as either inline or blocklevel. This option is ignored in XML mode.

new-inline-tags

Type: Tag names

Default: -

Example: tagX, tagY, ...

This option specifies new non-empty inline tags. This option takes a space or comma separated list of tag names. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. This option is ignored in XML mode.

new-pre-tags

This option specifies new tags that are to be processed in exactly the same way as HTML's

 element. This option takes a space or comma separated list of tag names. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. Note you can not as yet add new CDATA elements (similar to 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值