我经常在XML模式文件中看到类似下面的代码。据我了解,xmlns是定义一个新的命名空间。但是,遵循xmlns的长URL是非常必要的吗?我的意思是程序,解析器,真正打个电话,例如“http://www.springframework.org/schema/beans”?或者可以在线路简单,问题是:XML模式/命名空间
<beans xmlns="beansNamespace">
这里的
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:osgi="http://www.springframework.org/schema/osgi"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
"
>
可能重复http://stackoverflow.com/questions/5758041/why-are-urls-in-xml - 名称空间) – skaffman 2011-05-09 11:50:43