Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Ignoring whitespace in character data  RSS feed

Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I was wondering if someone could tell me how to get Axis to ignore
whitespace when deserializing an XML message into Java types. I am receiving an XML string which includes whitespace as part of the contents of an element whose type is an integer. When this element is deserialized Axis throws a NumberFormatException because of the presence of the whitespace (exception is thrown by the Integer constructor). Has anyone got any ideas on ways I might get around this issue - other than searching through the string I receive for elements whose type is integer and stripping any space for element content
Can't .... do .... plaid .... So I did this tiny ad instead:
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!