Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Ignoring whitespace in character data

 
John Ryan
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
Cheers,
Tom
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!