/** * Document parser. * @param source Source content stream to be parsed. * @return W3C ownerDocument. * @throws SAXException Unable to parse the content. * @throws IOException Unable to read the input stream. */ public Document parse(Source source) throws IOException, SAXException { DOMBuilder contentHandler = new DOMBuilder(getExecContext()); parse(source, contentHandler); return contentHandler.getDocument(); }
/** * Document parser. * @param source Source content stream to be parsed. * @return W3C ownerDocument. * @throws SAXException Unable to parse the content. * @throws IOException Unable to read the input stream. */ public Document parse(Source source) throws IOException, SAXException { DOMBuilder contentHandler = new DOMBuilder(getExecContext()); parse(source, contentHandler); return contentHandler.getDocument(); }
/** * Document parser. * @param source Source content stream to be parsed. * @return W3C ownerDocument. * @throws SAXException Unable to parse the content. * @throws IOException Unable to read the input stream. */ public Document parse(Source source) throws IOException, SAXException { DOMBuilder contentHandler = new DOMBuilder(getExecContext()); parse(source, contentHandler); return contentHandler.getDocument(); }
/** * Document parser. * @param source Source content stream to be parsed. * @return W3C ownerDocument. * @throws SAXException Unable to parse the content. * @throws IOException Unable to read the input stream. */ public Document parse(Source source) throws IOException, SAXException { DOMBuilder contentHandler = new DOMBuilder(getExecContext()); parse(source, contentHandler); return contentHandler.getDocument(); }
/** * Append the content, behind the supplied input stream, to suplied * document element. * <p/> * Used to merge document fragments into a document. * @param source Source content stream to be parsed. * @param appendElement DOM element to which the content fragment is to * be added. * @throws SAXException Unable to parse the content. * @throws IOException Unable to read the input stream. */ public void append(Source source, Element appendElement) throws IOException, SAXException { DOMBuilder contentHandler = new DOMBuilder(getExecContext()); contentHandler.setAppendElement(appendElement); parse(source, contentHandler); }
/** * Append the content, behind the supplied input stream, to suplied * document element. * <p/> * Used to merge document fragments into a document. * @param source Source content stream to be parsed. * @param appendElement DOM element to which the content fragment is to * be added. * @throws SAXException Unable to parse the content. * @throws IOException Unable to read the input stream. */ public void append(Source source, Element appendElement) throws IOException, SAXException { DOMBuilder contentHandler = new DOMBuilder(getExecContext()); contentHandler.setAppendElement(appendElement); parse(source, contentHandler); }
/** * Append the content, behind the supplied input stream, to suplied * document element. * <p/> * Used to merge document fragments into a document. * @param source Source content stream to be parsed. * @param appendElement DOM element to which the content fragment is to * be added. * @throws SAXException Unable to parse the content. * @throws IOException Unable to read the input stream. */ public void append(Source source, Element appendElement) throws IOException, SAXException { DOMBuilder contentHandler = new DOMBuilder(getExecContext()); contentHandler.setAppendElement(appendElement); parse(source, contentHandler); }
/** * Append the content, behind the supplied input stream, to suplied * document element. * * Used to merge document fragments into a document. * @param source Source content stream to be parsed. * @param appendElement DOM element to which the content fragment is to * be added. * @throws SAXException Unable to parse the content. * @throws IOException Unable to read the input stream. */ public void append(Source source, Element appendElement) throws IOException, SAXException { DOMBuilder contentHandler = new DOMBuilder(getExecContext()); contentHandler.setAppendElement(appendElement); parse(source, contentHandler); }
public Node filter(Source source) throws SmooksException { Node deliveryNode; if (source == null) { throw new IllegalArgumentException("null 'source' arg passed in method call."); } try { DOMParser parser = new DOMParser(executionContext); Document document = parser.parse(source); deliveryNode = filter(document); } catch (Exception cause) { throw new SmooksException("Unable to filter InputStream for target profile [" + executionContext.getTargetProfiles().getBaseProfile() + "].", cause); } return deliveryNode; }
/** * Phase the supplied input reader. * <p/> * Simply parses the input reader into a W3C DOM and calls {@link #filter(Document)}. * * @param source The source of markup to be filtered. * @return Node representing filtered document. */ public Node filter(Source source) { Node deliveryNode; if (source == null) { throw new IllegalArgumentException("null 'source' arg passed in method call."); } try { DOMParser parser = new DOMParser(executionContext); Document document = parser.parse(source); deliveryNode = filter(document); } catch (Exception cause) { throw new SmooksException("Unable to filter InputStream for target profile [" + executionContext.getTargetProfiles().getBaseProfile() + "].", cause); } return deliveryNode; }
/** * Phase the supplied input reader. * <p/> * Simply parses the input reader into a W3C DOM and calls {@link #filter(Document)}. * * @param source The source of markup to be filtered. * @return Node representing filtered document. */ public Node filter(Source source) { Node deliveryNode; if (source == null) { throw new IllegalArgumentException("null 'source' arg passed in method call."); } try { DOMParser parser = new DOMParser(executionContext); Document document = parser.parse(source); deliveryNode = filter(document); } catch (Exception cause) { throw new SmooksException("Unable to filter InputStream for target profile [" + executionContext.getTargetProfiles().getBaseProfile() + "].", cause); } return deliveryNode; }
/** * Phase the supplied input reader. * <p/> * Simply parses the input reader into a W3C DOM and calls {@link #filter(Document)}. * * @param source The source of markup to be filtered. * @return Node representing filtered document. */ public Node filter(Source source) { Node deliveryNode; if (source == null) { throw new IllegalArgumentException("null 'source' arg passed in method call."); } try { DOMParser parser = new DOMParser(executionContext); Document document = parser.parse(source); deliveryNode = filter(document); } catch (Exception cause) { throw new SmooksException("Unable to filter InputStream for target profile [" + executionContext.getTargetProfiles().getBaseProfile() + "].", cause); } return deliveryNode; }