加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

xml笔记:3 引入xsd来编写xml

发布时间:2020-12-15 22:43:45 所属栏目:百科 来源:网络整理
导读:说明: xsi:schemaLocation="http://www.nl.org/mapper" 引入xsd文件 xmlns="http://www.nl.org/mapper" 默认命名空间 mapper.xml ?xml version="1.0" encoding="UTF-8"?mapper namespace="UserDemo" xmlns="http://www.nl.org/mapper"xmlns:xsi="http://www.

说明:

xsi:schemaLocation="http://www.nl.org/mapper"

引入xsd文件

xmlns="http://www.nl.org/mapper"


默认命名空间



mapper.xml


<?xml version="1.0" encoding="UTF-8"?>
<mapper namespace="UserDemo" 
		xmlns="http://www.nl.org/mapper"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xsi:schemaLocation="http://www.nl.org/mapper" >
		<select id="query">
			select * from user u
			<if property="name" notNull=""/>
		</select>
		<select id=""></select>
		<insert id="insert">
			insert into user(id) values(#id)
			<if property="name" notNull=""></if>
		</insert>
</mapper>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读