(1)web文件头部声明
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
(2)mapper文件头部声明
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
本文详细解析了web应用配置文件及MyBatis映射文件中XML声明与DTD的使用方式,介绍了如何通过正确的XML头部声明确保文件符合特定版本的规范,以及DTD在验证XML文档结构正确性方面的作用。
2059

被折叠的 条评论
为什么被折叠?



