XML基础与安全攻防
XML
XML程序
<?xml version="1.0" encoding="UTF-8"?>
<family>
<father>father</father>
<mother>mother</mother>
<childern>
<child1>child1</child1>
<chile>child2</chile>
</childern>
</family>xml实体引用
| 实体名称 | 付号 | 解释 |
|---|---|---|
< |
< | 小于 |
> |
> | 大于 |
& |
& | 和号 |
' |
'' | 单引号 |
quot; |
"" | 双引号 |
程序示例:
<?xml version="1.0" encoding="UTF-8"?>
<family>
<father>father</father>
<mother>mother</mother>
<childern>
<child1>child1 < > ' " & chile2</child1>
<chile>child2</chile>
</childern>
</family>浏览器显示:

注释:
ctrl+/
元素间空格一个空格显示,多个空格只显示一个

属性
写在标签里面