org.jdom.IllegalDataException: The data ""is not legal for a JDOM attribute: 0xb is not a legal 异常
来源:互联网 发布:mac book u盘不能用 编辑:程序博客网 时间:2024/04/30 14:36
今天用jdom生成xml,在操作中出现了 org.jdom.IllegalDataException: The data ""is not legal for a JDOM attribute: 0xb is not a legal 异常,仔细跟踪发现,在原有的组建对象的属性中出现了异常字符,通过下面的替换,再重新转换成String,trim后正常。
- char [] xmlChar = paragraph.toCharArray();
- for (int i=0; i < xmlChar.length; ++i) {
- if (xmlChar[i] > 0xFFFD)
- {
- //直接替换掉0xb
- xmlChar[i] =' ';
- }
- else if (xmlChar[i] < 0x20 && xmlChar[i] != 't' & xmlChar[i] != 'n' & xmlChar[i] != 'r')
- {
- //直接替换掉0xb
- xmlChar[i] =' ' ;
- }
- }
- org.jdom.IllegalDataException: The data ""is not legal for a JDOM attribute: 0xb is not a legal 异常
- org.jdom.Document is not available so the jdom converter will not load
- SyntaxError: "x" is not a legal ECMA-262 octal constant的问题(JS页面)
- T4模板异常:System.ArgumentException: Empty path name is not legal.
- SpringMVC异常:org.springframework.web.multipart.MultipartException: The current request is not a multi
- (ZT) Is it legal (and moral) for a member function to say delete this?
- 'inline' is the only legal storage class for constructors
- The selection is not within a valid module异常
- The current request is not a multipart request异常
- '{DependencyProperty.UnsetValue}' is not a valid value for the '.........Background'
- BIRT a data view is not available
- $ is not a function
- $ is not a function
- is not a function
- The Linker Is not a Magical Program
- The Linker Is Not a Magical Program
- the descriptor is not a socket
- ORA-15238: 11.2 is not a valid value for attribute compatible.advm 处理方法
- Android触摸屏输入系统
- 新I/O(Channel)
- details_in_CPUSET
- 在 VS2005 下使用 CppUnit 的准备工作
- 打通 C++ 和 C# 关于 COM 组件互相调用的任督二脉
- org.jdom.IllegalDataException: The data ""is not legal for a JDOM attribute: 0xb is not a legal 异常
- 本机访问虚拟机web服务器失败的解决办法
- sql 加密
- PHP+MYSQL+MYSQL+SESSION实现用户登录的实例
- 折腾了一晚上Windows网络却未果
- android4.0与2.3版本的TP代码区
- 探讨i++和++i
- Objective-C消息机制的原理
- gcc检测不到的逻辑错误?