Read off XML data from the InputStream up to the termination of the XML. XML data is returned in a byte array. The InputStream is left just following the XML terminator. Processing is done with as little interpretation as possible, so invalid XML will cause problems with little feedback about what's wrong.