读书人

xmlns与xsi:schemaLocation含意

发布时间: 2012-10-25 10:58:58 作者: rapoo

xmlns与xsi:schemaLocation含义

xmlns 说明参见 http://www.cnblogs.com/jhxk/articles/1619105.html

xsi:schemaLocation说明参见http://www.w3school.com.cn/schema/schema_example.asp

?

xsi:schemaLocation中的模式文档.xsd文件一般都在本地,比如spring

<beans default-autowire="byName"

xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:aop="http://www.springframework.org/schema/aop" xmlns:util="http://www.springframework.org/schema/util"

xsi:schemaLocation="http://www.springframework.org/schema/beans?

http://www.springframework.org/schema/beans/spring-beans-2.0.xsd?

http://www.springframework.org/schema/aop?

http://www.springframework.org/schema/aop/spring-aop-2.0.xsd?

http://www.springframework.org/schema/util?

http://www.springframework.org/schema/util/spring-util-2.5.xsd ">

中的.xsd文件都在spring包内,如下图:


xmlns与xsi:schemaLocation含意
?spring.schemas中定义了文档的具体地址:


xmlns与xsi:schemaLocation含意

读书人网 >XML SOAP

热点推荐