/** * Returns a node representing a whole xml given an xml document. * * @param text * an xml document (as a byte array) * @return a node representing a whole xml * * @throws SAXException * indicates an error parsing the xml document */ private static Node getDOM(byte[] text, String encoding) throws SAXException { log.debug("Start : getDOM"); Node node = getTidyParser(encoding).parseDOM(new ByteArrayInputStream(text), null); if (log.isDebugEnabled()) { log.debug("node : " + node); } log.debug("End : getDOM"); return node; } }