File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes Validator ignore integers with spaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Validator ignore integers with spaces" Watch "Validator ignore integers with spaces" New topic

Validator ignore integers with spaces

Leonardo Gangemi

Joined: Jun 19, 2012
Posts: 1
// XSD:

// XML (there is an extra space after number 7)

// Java (

The code above returns "The XML is Well Formed and VALID", but the problem is the I get an
java.lang.NumberFormatException: For input string: "7 "
when I try to readObject, like this:

How can I deal with this?

Tks in advance.
I agree. Here's the link:
subject: Validator ignore integers with spaces
It's not a secret anymore!