Solving - “A pseudo attribute name is expected” Error in JAXP解决-“伪属性名称,预计”错误在j axp
I was writing a xml data reader in Java using JDK’s inbuilt XML processing libraries (JAXP) when I persistently hit across this annoying exception with error message: A pseudo attribute name is expected.我写的XML数据读者在Java中使用JDK的内置的XML处理图书馆( jaxp ) ,当我坚持打击跨越这恼人的例外与错误讯息:一个伪属性名称是可预见的。 The error is displayed on the first line itself.错误是显示在第一线本身。
Google search wasn’t of much help. Google搜索没有多大帮助。 I tried few suggestions, which were not of any use.我尝试的几点建议,不被任何使用。 Then I noticed the obvious.然后我注意到显而易见的。
My xml instruction was:我的XML的指示是:
< ?xml version="1.0" > < ? XML版本= “ 1.0 ” >
It was a typo.这是一个错字。 It should have been:它应该已经:
< ?xml version="1.0" ?> < ? XML版本= “ 1.0 ” ? >
Obviously the xml instruction was illegal.很明显, XML的指令是非法的。 However the error message was cryptic and gave no hint to the actual cause of the problem.不过,错误讯息是隐形了,没有暗示的实际问题的原因。
Filed under提起下 How To如何 , , Java Software Java软件 , , Tech Note技术说明 | |
| |
RSS 2.0 2.0 | |
Trackback Trackback跟踪 this Article |此文章|
Email this Article电子邮件此文章
You may also like to read您也可以想读 |




October 6th, 2006 at 8:40 am 2006年10月6日在上午8时40分
Thank you for your post.谢谢您的职位。 I got a similar error message from a webservice I was calling.我收到类似的错误讯息,从一个WebService的我通话。 “WebServicesFault … Error in line 1: pseudo attribute name is expected” “ webservicesfault …错误,在第1行:伪属性名称,预计”
xml was my third parameter, but I was calling a TPM web service and couldn’t find server-side trace so I had no indication that it was during xml parsing of my 3rd parameter. XML的是我的第三个参数,但我是调用TPM的Web服务,并无法找到服务器端的痕量因此,我已没有任何迹象表明这是在XML剖析我的第三参数。
Yours is the only post on the web that was useful.你是唯一的邮政在网路上是有益的。 Without it it would’ve taking me a very long time to figure this one out.没有它,它会考虑我已经很长一段时间,以这个数字一出来。
Thank you very much.非常感谢。
Ally盟友
April 2nd, 2008 at 2:31 pm 2008年4月2日在下午2时31分
Thanks for the point Angsuman, exact issue with CF here and it solved the problem.感谢这点由Angsuman ,确切的问题与比照在这里,而且解决了这个问题。
April 4th, 2008 at 2:45 am 2008年4月4日在上午02时45分
Happy to be of help.高兴能获得帮助。
June 2nd, 2008 at 5:44 am 2008年6月2日在上午05时44分
Same as Mark here… thanks to you, now Google DOES help!同时,正如马克在这里…感谢你,现在Google并帮助!