/** * Returns the XML representation as a DOM document. * * @return The DOM document. */ protected Document getDocument() throws Exception { return getDocumentBuilder().parse(getInputSource()); }
/** * Returns the XML representation as a DOM document. * * @return The DOM document. */ protected Document getDocument() throws Exception { return getDocumentBuilder().parse(getInputSource()); }
/** * Returns a DOM source. * * @return A DOM source. * @throws IOException */ public javax.xml.transform.dom.DOMSource getDomSource() throws IOException { javax.xml.transform.dom.DOMSource result = null; Node document = null; try { document = getDocumentBuilder().parse(getInputSource()); } catch (SAXException se) { throw new IOException("Couldn't read the XML representation. " + se.getMessage()); } if (document != null) { result = new javax.xml.transform.dom.DOMSource(document); if (getLocationRef() != null) { result.setSystemId(getLocationRef().getTargetRef().toString()); } } return result; }