This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am building a XML document on the fly and want to validate the document before storing the file in the database. But when I try to validate it using saxBuilder I got an error even that I know the XML document is alright.
org.jdom.input.JDOMParseException: Error on line 2: cvc-elt.1: Cannot find the declaration of element 'Invoice'.
It seems that something goes wrong when validating the ByteArray: Document d = saxBuilder.build( new ByteArrayInputStream( buff ) );