Friday, July 10, 2009

java.io.IOException: Start of root element expected.

I hit a problem when passing an InputStream object to a parser today.

java.io.IOException: Start of root element expected.



Cause: The InputSteam object had been read prior to passing it to the DomParse. Seems obvious now, but its easy to miss this if you happen to be passing data to be parsed from some other method. (especially if you want to verify the contents of the InputStream)

1 comment: