关于XML声明

时间:2014-09-29 01:05:12

标签: xml

例如像这样

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans          
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/context 
    http://www.springframework.org/schema/context/spring-context-3.0.xsd">

    <context:component-scan base-package="com.tutorialspoint" />

    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
            <property name="prefix" value="/WEB-INF/jsp/" />
            <property name="suffix" value=".jsp" />
    </bean>

</beans>

这是 http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context/spring-context-3.0.xsd

我想知道下载此xsd文件的时间

如果我的电脑未连接到互联网 我以为我的电脑无法读取这个xml文件。 因为我的电脑无法下载xsd文件

但是我的电脑显示了这个xml文件 为什么呢?

什么是xsd?

我的英语所以...不好。 遗憾。

1 个答案:

答案 0 :(得分:0)

当您要求XML解析器根据描述该类文档的模式验证文档的结构时,使用XSD。

如果您没有请求验证,解析器将不会坚持检索架构,只会检查文档是否格式良好&#34;,这意味着它在语法上是正确的XML。请注意,如果没有针对模式进行验证,模式定义的类型信息都不可用,只有基本的XML数据模型。

相关问题