xml命名空间

我们两清 提交于 2019-12-22 18:06:40

xmlns:命名空间声名

命名空间的名字

p="http://contoso.com/People"

 

schemaLocation:命名空间的变量、结构、详情、标准等的定义位置

空间名字对应的定义文档的位置

http://contoso.com/People 
http://contoso.com/schemas/people.xsd

 

 

<p:Person
xmlns:p="http://contoso.com/People"
xmlns:v="http://contoso.com /Vehicles"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://contoso.com/People
http://contoso.com/schemas/people.xsd
http://contoso.com/schemas/Vehicles
http://contoso.com/schemas/vehicles.xsd
http://contoso.com/schemas/People
http://contoso.com/schemas/people.xsd">
<name>John</name>
<age>28</age>
<height>59</height>
<v:Vehicle>
<color>Red</color>
<wheels>4</wheels>
<seats>2</seats>
</v:Vehicle>
</p:Person>

 

https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/ms256100(v=vs.100)

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!