Michael O'Connor

Greenhorn
+ Follow
since Oct 11, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Michael O'Connor

Lines 26 - 32 were there so I could print out as a string what I was reading back from the database to check if it was valid.

Line 33 introduced a new stream to read the data again as you cannot reuse the existing stream as it has already read the data, this was giving another error.

While aesthetically correct neither of these points are relevant to the issue at hand.

I did manage to fix this however by changing how I was reading the stream in & also by fixing up my data.

Thanks for the comments.

Hi Guys,

I have a simple webservice which has one method which saves an xml 'string' as a blob.
Another method then reads this back in, attempts to parse it & then change a value in it.
Once this is done I want to pass this string on to another class. I do not want to create any files.

However when parsing the XML I have been getting constant errors, the latest of which is:

SAXParseException: XML document structures must start and end within the same entity.

This gets thrown by the line: Document doc = builder.parse(newInputStream);

I have read the input in as a string so I can see that the data looks ok & is all present.

Any help would be greatly appreciated.

The code is below: