– HTML通用实体的定义 – 结构化标记处理工具(Python教程)(参考资料)
html.entities– HTML通用实体的定义
这个模块定义了四个词典,html5,name2codepoint, codepoint2name和entitydefs.
html.entities.html5-
将HTML5命名字符引用[1]映射到等效Unicode字符的字典,例如
html5["gt;"] == ">"。注意名称中包含尾随分号(例如"gt;"),但是即使没有这些微米,一些名称也被标准接受:在这种情况下,名称与没有";"。参见html.unescape().新版本3.3.
html.entities.entitydefs
html.entities.name2codepoint
html.entities.codepoint2name-
将Unicode代码点映射到HTML实体名称的字典.
Footnotes
| [1] | 参见https://www.w3.org/TR/html5/syntax.html#named-character-references |
评论被关闭。