mybatis 报The content of elements must consist of well-formed character data or markup. 语法格式错误
最近在写sql的时候 同时使用到了 >= 和 <= 之前只使用一个的时候 没有什么问题,今天同时使用到了两个,结果xml出现了The content of elements must consist of well-formed character data or markup.提示格式错误;
原来在xml中使用“<” ">" "&" 等一些这样的操作符时,xml会把它当成一个新的元素开始;
解决方法: 使用< ![CDATA[" 标记开始,以"]]> 包裹
在< ![CDATA[" 标记开始,以"]]> 里包裹的元素,在xml解析时会被解析器忽略
比如 >= 可以写成 <![CDATA[ >= ]]> ; <=等于可以写成 <![CDATA[ <= ]]>
记下次错,以防忘记
mybatis 报The content of elements must consist of well-formed character data or markup. 语法格式错误的更多相关文章
- Mybatis 异常: The content of elements must consist of well-formed character data or markup
原因很简单:在ibatis的配置文件中不能出现小于号(>) <delete id="deleteByPrimaryKey" parameterType=&quo ...
- Cause: org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.
Caused by: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org ...
- ibatis配置文件中的XML解析错误The content of elements must consist of well-formed character data or markup.
在检查过所有的标签名都没有问题的情况下. xml中的小于号属于非法字符. SQL语句中则可能需要小于号,此时就需要用<![CDATA[ ]]>将小于号包裹,如此不会被xml解析器解析. ...
- ibatis动态sql配置启动时提示:The content of elements must consist of well-formed character data...
ibatis动态sql配置启动时提示:The content of elements must consist of well-formed character data... 2012-07-18 ...
- thymeleaf 解析html时,出现 SAXParseException: The content of elements must consist of well-formed characte
thymeleaf 解析html时,出现 SAXParseException: The content of elements must consist of well-formed characte ...
- ibatiS启动的异常 The content of elements must consist of well-formed character data or markup
ibatiS启动的异常 The content of elements must consist of well-formed character data or markup 配置的动态SQL语句里 ...
- The content of elements must consist of well-formed character data or markup
java 中使用dom4j解析含有特殊字符的xml文件出现了如题的错误 这个时候需要在特殊字符外面加上 <![CDATA[ /6169220648+20671/1>7+-47390045& ...
- mybatis报错Mapped Statements collection does not contain value for com.inter.IOper
首页 > 精品文库 > mybatis报错Mapped Statements collection does not contain value for com.inter.IOper m ...
- springboot 报错 Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported
开始 controller 方法写的是 @RequestMapping( value = "/add", method = RequestMethod.POST ) public ...
随机推荐
- rabbitmp安装记录
第一次安装一路遇坑,安装步骤及问题如下 1:安装erlang依赖 yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel opens ...
- Ubuntu下的Selenium爬虫的配置
在服务器Ubuntu系统上跑爬虫,爬虫是基于Selenium写的,遇到好几个问题,现在这里记录一下. 1. 安装环境 阿里云,Ubuntu16.04,因为没有界面,所以远程命令行操作.爬虫是基于Sel ...
- 关于python中loc和iloc方法
pandas以类似字典的方式来获取某一列的值 import pandas as pd import numpy as np table = pd.DataFrame(np.zeros((4,2)), ...
- Poj2018 Best Cow Fences
传送门 题目大意就是给定一个长度为 n 的正整数序列 A ,求一个平均数最大的,长度不小于 L 的子序列. 思路: 二分答案. Code: #include<iostream> #incl ...
- python+selenium测试
网址http://blog.csdn.net/u011541946/article/category/6788788/1
- c++ 线程间通信方式
一:两个进程间的两个线程通信,相当于进程间通信 二:一个进程中的两个线程间通信 通信方式: 1.互斥锁 mutex; lock_guard (在构造函数里加锁,在析构函数里解锁) unique_loc ...
- python 2.7 读写 opc数据
运行环境 python2.7+window server2008+keep server 1.安装OpenOPC a> 下载 OpenOPC-1.3.1.win32-py2.7 (1).exe ...
- ASP.NET MVC CSRF (XSRF) security
CSRF(Cross-site request forgery)跨站请求伪造,也被称为“One Click Attack”或者Session Riding,通常缩写为CSRF或者XSRF,是一种对网站 ...
- Python 文件的基本操作
打开文件的模式有: r,只读模式(默认). w,只写模式.[不可读:不存在则创建:存在则删除内容:] a,追加模式.[可读: 不存在则创建:存在则只追加内容:] "+" 表示可 ...
- 关于PHP的mkdir函数
问题:dedecms5.7 php5.6 我想项目根目录下的uploads文件夹下动态创建一个文件夹/uploads/imgs $path = '/uploads/imgs'; mkdir($path ...