/** * Attempts to parse the input xml into a single element. * @param xml * @return The document object * @throws XmlException if a parse error occured. */ public static Element parse(String xml) throws XmlException { DocumentBuilder builder = null; try { builder = getBuilder(); InputSource is = new InputSource(new StringReader(xml.trim())); return builder.parse(is).getDocumentElement(); } catch (SAXParseException e) { throw new XmlException( e.getMessage() + " At: (" + e.getLineNumber() + ',' + e.getColumnNumber() + ')', e); } catch (SAXException e) { throw new XmlException(e); } catch (ParserConfigurationException e) { throw new XmlException(e); } catch (IOException e) { throw new XmlException(e); } finally { // Remove reference to XmlUtils class to insure classes can be unloaded if (builder != null) { builder.setErrorHandler(null); } } }
/** * Attempts to parse the input xml into a single element. * @param xml * @return The document object * @throws XmlException if a parse error occured. */ public static Element parse(String xml) throws XmlException { DocumentBuilder builder = null; try { builder = getBuilder(); InputSource is = new InputSource(new StringReader(xml.trim())); return builder.parse(is).getDocumentElement(); } catch (SAXParseException e) { throw new XmlException( e.getMessage() + " At: (" + e.getLineNumber() + ',' + e.getColumnNumber() + ')', e); } catch (SAXException e) { throw new XmlException(e); } catch (ParserConfigurationException e) { throw new XmlException(e); } catch (IOException e) { throw new XmlException(e); } finally { // Remove reference to XmlUtils class to insure classes can be unloaded if (builder != null) { builder.setErrorHandler(null); } } }
/** * Attempts to parse the input xml into a single element. * @param xml * @return The document object * @throws XmlException if a parse error occured. */ public static Element parse(String xml) throws XmlException { DocumentBuilder builder = null; try { builder = getBuilder(); InputSource is = new InputSource(new StringReader(xml.trim())); return builder.parse(is).getDocumentElement(); } catch (SAXParseException e) { throw new XmlException( e.getMessage() + " At: (" + e.getLineNumber() + ',' + e.getColumnNumber() + ')', e); } catch (SAXException e) { throw new XmlException(e); } catch (ParserConfigurationException e) { throw new XmlException(e); } catch (IOException e) { throw new XmlException(e); } finally { // Remove reference to XmlUtils class to insure classes can be unloaded if (builder != null) { builder.setErrorHandler(null); } } }
/** * Attempts to parse the input xml into a single element. * @param xml * @return The document object * @throws XmlException if a parse error occured. */ public static Element parse(String xml) throws XmlException { DocumentBuilder builder = null; try { builder = getBuilder(); InputSource is = new InputSource(new StringReader(xml.trim())); return builder.parse(is).getDocumentElement(); } catch (SAXParseException e) { throw new XmlException( e.getMessage() + " At: (" + e.getLineNumber() + ',' + e.getColumnNumber() + ')', e); } catch (SAXException e) { throw new XmlException(e); } catch (ParserConfigurationException e) { throw new XmlException(e); } catch (IOException e) { throw new XmlException(e); } finally { // Remove reference to XmlUtils class to insure classes can be unloaded if (builder != null) { builder.setErrorHandler(null); } } }
/** * Attempts to parse the input xml into a single element. * @param xml * @return The document object * @throws XmlException if a parse error occured. */ public static Element parse(String xml) throws XmlException { DocumentBuilder builder = null; try { builder = getBuilder(); InputSource is = new InputSource(new StringReader(xml.trim())); return builder.parse(is).getDocumentElement(); } catch (SAXParseException e) { throw new XmlException( e.getMessage() + " At: (" + e.getLineNumber() + ',' + e.getColumnNumber() + ')', e); } catch (SAXException e) { throw new XmlException(e); } catch (ParserConfigurationException e) { throw new XmlException(e); } catch (IOException e) { throw new XmlException(e); } finally { // Remove reference to XmlUtils class to insure classes can be unloaded if (builder != null) { builder.setErrorHandler(null); } } }
throw new SpecParserException(new XmlException(ele));
throw new SpecParserException(new XmlException(ele));
throw new SpecParserException(new XmlException(ele));