xml文件分析

1、每个xml文件都有一个头(schema约束),它能约束xml文件中的标签(可以写哪一些标签、标签之间摆放的顺序、标签里的属性有哪些、标签又可以嵌套哪些子标签)

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"

       xmlns:aop="http://www.springframework.org/schema/aop"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        https://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context
        https://www.springframework.org/schema/context/spring-context.xsd

        http://www.springframework.org/schema/aop
        https://www.springframework.org/schema/aop/spring-aop.xsd">
</beans>

 

如何引入约束Schema:可以在对应官网上复制约束,例如我要复制Spring配置文件的约束

学习  ---》参考文档

核心文档

往下翻,找到Appendix,context-schema(说明有了这段话能用congtext开头的标签)

PS:如果看不懂英文,可以右键翻译,然后左边页面是英文页面,右边中文对照着看,方便学习

这是最后一个页面的网址

https://docs.spring.io/spring-framework/docs/current/reference/html/core.html#appendix

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值