XML Schema与CSS样式表的深入解析
1. XML文档结构与元素声明
在XML文档中,有两种基本的文档结构可供选择。示例结构如下:
<song xmlns="http://www.lanw.com/namespaces/song">
<title>text of title</title>
<fileSize>text of fileSize</fileSize>
</song>
或者
<song xmlns="http://www.lanw.com/namespaces/song">
<artist>text of artist</artist>
<fileSize>text of fileSize</fileSize>
</song>
这两种结构都要求 song 元素作为根元素,且 song 元素只能有两个子元素。第一个子元素可以是 title 或 artist ,第二个子元素必须是 fileSize 。由于未使用 minOccurs 或 maxOccurs 属性,每个元素只能使用一次。
超级会员免费看
订阅专栏 解锁全文
680

被折叠的 条评论
为什么被折叠?



