xml命名空间

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)

 

原文地址:https://www.cnblogs.com/feng9exe/p/11244405.html