/** * Evaluates an XPath expression as a DOM NodeList. If the evaluation fails, * null will be returned. * * @return The evaluation result. */ public NodeList getNodes(String expression) { final org.w3c.dom.NodeList nodes = (org.w3c.dom.NodeList) internalEval( expression, javax.xml.xpath.XPathConstants.NODESET); return (nodes == null) ? null : new NodeList(nodes); }
/** * Evaluates an XPath expression as a DOM NodeList. If the evaluation fails, * null will be returned. * * @return The evaluation result. */ public NodeSet getNodes(String expression) { final NodeList nodes = (NodeList) internalEval(expression, XPathConstants.NODESET); return (nodes == null) ? null : new NodeSet(nodes); }
/** * Validates the XML representation against a given schema. * * @param schemaRepresentation * The XML schema representation to use. * @param result * The Result object that receives (possibly augmented) XML. */ public void validate(Representation schemaRepresentation, javax.xml.transform.Result result) throws Exception { validate(getSchema(schemaRepresentation), result); }
/** * Create a new XML writer. * <p> * Write to the writer provided. * </p> * * @param writer * The output destination, or null to use standard output. */ public XmlWriter(Writer writer) { init(writer); }
/** * Evaluates an XPath expression as a number. If the evaluation fails, null * will be returned. * * @return The evaluation result. */ public Double getNumber(String expression) { return (Double) internalEval(expression, javax.xml.xpath.XPathConstants.NUMBER); }
/** * Returns a SAX source. * * @return A SAX source. * @throws IOException */ public javax.xml.transform.sax.SAXSource getSaxSource() throws IOException { return getSaxSource(this); }
/** * Releases the namespaces map. */ @Override public void release() { if (this.source != null) { this.source = null; } super.release(); }
/** * Writes the transformed source into the given JAXP result. The source is * retrieved using the {@link #getSaxSource()} method. * * @param result * The JAXP result object. * @throws IOException */ public void write(Result result) throws IOException { transform(getSaxSource(), result); }
/** * Returns the SAX source associated to the source representation. * * @return The SAX source associated to the source representation. * @throws IOException */ public SAXSource getSaxSource() throws IOException { return toSaxSource(getSourceRepresentation()); }
/** * Create a new XML writer. * <p> * Write to standard output. * </p> */ public XmlWriter() { init(null); }
/** * Evaluates an XPath expression as a boolean. If the evaluation fails, null * will be returned. * * @return The evaluation result. */ public Boolean getBoolean(String expression) { return (Boolean) internalEval(expression, javax.xml.xpath.XPathConstants.BOOLEAN); }
/** * Returns a SAX source. * * @return A SAX source. * @throws IOException */ public SAXSource getSaxSource() throws IOException { return getSaxSource(this); }
/** * Releases the namespaces map. */ @Override public void release() { if (this.source != null) { this.source = null; } super.release(); }
/** * Create a new XML writer. * <p> * Write to the writer provided. * </p> * * @param writer * The output destination, or null to use standard output. */ public XmlWriter(Writer writer) { init(writer); }
/** * Evaluates an XPath expression as a boolean. If the evaluation fails, null * will be returned. * * @return The evaluation result. */ public Boolean getBoolean(String expression) { return (Boolean) internalEval(expression, XPathConstants.BOOLEAN); }
/** * Evaluates an XPath expression as a number. If the evaluation fails, null * will be returned. * * @return The evaluation result. */ public Double getNumber(String expression) { return (Double) internalEval(expression, XPathConstants.NUMBER); }
/** * Evaluates an XPath expression as a DOM Node. If the evaluation fails, * null will be returned. * * @return The evaluation result. */ public Node getNode(String expression) { return (Node) internalEval(expression, javax.xml.xpath.XPathConstants.NODE); }
/** * Evaluates an XPath expression as a DOM Node. If the evaluation fails, * null will be returned. * * @return The evaluation result. */ public Node getNode(String expression) { return (Node) internalEval(expression, XPathConstants.NODE); }