2

I am seeing the following error message in my tomcat logs. I'm not sure what it means. Can someone help with interpretation:

org.xmlpull.v1.XmlPullParserException: entity reference names can not start with character ' ' (position: START_TAG seen ...</DID><TOKEN>d & ... @1:8134)

Thank you,

E

Elliott
  • 5,523
  • 10
  • 48
  • 87
  • What's at the line in the XML file the error message points to? (Seems like it should be line 1 character 8134 or vice versa.) That said, my bet is the XML file it's parsing is just invalid in that ampersands in the text aren't escaped with `&` – millimoose Feb 01 '12 at 03:57
  • Also, if the XML parsing code is yours, you might want to replace XmlPull with StAX, since it's actually getting updates as part of the JDK. – millimoose Feb 01 '12 at 03:58

1 Answers1

2

Someone is sending improperly escaped (and therefore invalid) XML. Unless its in a CDATA section, and amperand must be the start character in an entity reference. Based on the error message it looks like there's an unescaped ampersand followed by a space. The correct way to represent this in the XML is &amp;

BillRobertson42
  • 12,602
  • 4
  • 40
  • 57