public static Document createDocumentFromString(final String xmlDoc) throws XMLParsingException {
        try {
            return new Builder().build(xmlDoc.trim(), "");
        } catch (ParsingException | IOException ex) {
            throw new XMLParsingException("Can not parse string " + xmlDoc, ex);
        }
    }
public static Document createDocumentFromString ( final String xmlDoc ) throws XMLParsingException { try { return new Builder ( ) . build ( xmlDoc . trim ( ) , "" ) ; } catch ( ParsingException | IOException ex ) { throw new XMLParsingException ( "Can not parse string " + xmlDoc , ex ) ; } }
@param xmlDoc
@return
@throws XMLParsingException