使用Stax解析XML文件时出现Unicode(0xb)错误 [英] Unicode(0xb) error while parsing an XML file using Stax

查看:582
本文介绍了使用Stax解析XML文件时出现Unicode(0xb)错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解析XML文件Stax时产生错误:

While parsing an XML file Stax produces an error:

Unicode(0xb)错误-在文档的元素内容中发现无效的XML字符(Unicode:0xb).

Unicode(0xb) error-An invalid XML character (Unicode: 0xb) was found in the element content of the document.

只需单击下面的链接,其中xml行的特殊字符为"VI".它不是字母字符:当您尝试将其复制并粘贴到记事本中时,您将获得一些符号.我尝试使用Stax解析它.它正在显示上述错误.

Just click on the link below with the xml line with special character as "VI". It's not an alphabetical character: when you try to copy and paste it in Notepad, you will get it as some symbol. I have tried parsing it using Stax. It was showing the above-mentioned error.

请有人可以给我一个解决方案吗?

Please can somebody give me a solution for this?

谢谢.

推荐答案

0xB(垂直选项卡)在XML中不是有效字符. ASCII 32(0x20,空格)之前的唯一有效字符是0x9(制表符),0xA(回车符)和0xD(换行符).

0xB (vertical tab) is not a valid character in XML. The only valid characters before ASCII 32 (0x20, space) are 0x9 (tab), 0xA (carriage return) and 0xD (line feed).

简而言之,您要解析的不是XML.

In short, what you are trying to parse is NOT XML.

这篇关于使用Stax解析XML文件时出现Unicode(0xb)错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆