public BodyParserResults parse(String xml) throws BOSHException {
        BodyParserResults result = new BodyParserResults();
        Exception thrown;
        try {
            InputStream inStream = new ByteArrayInputStream(xml.getBytes());
            SAXParser parser = getSAXParser();
            parser.parse(inStream, new Handler(parser, result));
            return result;
        } catch (SAXException saxx) {
            thrown = saxx;
        } catch (IOException iox) {
            thrown = iox;
        }
        throw(new BOSHException("Could not parse body:\n" + xml, thrown));
    }