Solving - “A pseudo attribute name is expected” Error in JAXP
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. The error is displayed on the first line itself.
Google search wasn’t of much help. I tried few suggestions, which were not of any use. Then I noticed the obvious.
My xml instruction was:
< ?xml version="1.0" >
It was a typo. It should have been:
< ?xml version="1.0" ?>
Obviously the xml instruction was illegal. However the error message was cryptic and gave no hint to the actual cause of the problem.
Filed under How To, Java Software, Tech Note |
|
RSS 2.0 |
Trackback this Article
|
Email this Article
You may also like to read |



Add to Technorati Favorites
October 6th, 2006 at 8:40 am
Thank you for your post. I got a similar error message from a webservice I was calling. “WebServicesFault … Error in line 1: pseudo attribute name is expected”
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.
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
Thanks for the point Angsuman, exact issue with CF here and it solved the problem.
April 4th, 2008 at 2:45 am
Happy to be of help.
June 2nd, 2008 at 5:44 am
Same as Mark here… thanks to you, now Google DOES help!