Package javax.xml.transform.stax

Examples of javax.xml.transform.stax.StAXSource


    private static Source createStaxSource(XMLStreamReader streamReader) {
      return new StAXSource(streamReader);
    }

    private static Source createStaxSource(XMLEventReader eventReader) throws XMLStreamException {
      return new StAXSource(eventReader);
    }
View Full Code Here


   * Inner class to avoid a static JAXP 1.4 dependency.
   */
  private static class Jaxp14StaxHandler {

    private static Source createStaxSource(XMLStreamReader streamReader) {
      return new StAXSource(streamReader);
    }
View Full Code Here

    private static Source createStaxSource(XMLStreamReader streamReader) {
      return new StAXSource(streamReader);
    }

    private static Source createStaxSource(XMLEventReader eventReader) throws XMLStreamException {
      return new StAXSource(eventReader);
    }
View Full Code Here

   * Inner class to avoid a static JAXP 1.4 dependency.
   */
  private static class Jaxp14StaxHandler {

    private static Source createStaxSource(XMLStreamReader streamReader) {
      return new StAXSource(streamReader);
    }
View Full Code Here

    private static Source createStaxSource(XMLStreamReader streamReader) {
      return new StAXSource(streamReader);
    }

    private static Source createStaxSource(XMLEventReader eventReader) throws XMLStreamException {
      return new StAXSource(eventReader);
    }
View Full Code Here

     * @throws XMLStreamException
     */
    @Converter
    public StAXSource toStAXSource(String source, Exchange exchange) throws XMLStreamException {
        XMLStreamReader r = new StaxConverter().createXMLStreamReader(new StringReader(source));
        return new StAXSource(r);
    }   
View Full Code Here

     * @throws XMLStreamException
     */
    @Converter
    public StAXSource toStAXSource(byte[] in, Exchange exchange) throws XMLStreamException {
        XMLStreamReader r = new StaxConverter().createXMLStreamReader(new ByteArrayInputStream(in), exchange);
        return new StAXSource(r);
    }
View Full Code Here

     * @throws XMLStreamException
     */
    @Converter
    public StAXSource toStAXSource(InputStream source, Exchange exchange) throws XMLStreamException {
        XMLStreamReader r = new StaxConverter().createXMLStreamReader(source, exchange);
        return new StAXSource(r);
    }
View Full Code Here

     */
    @Converter
    public StAXSource toStAXSource(File file, Exchange exchange) throws FileNotFoundException, XMLStreamException {
        InputStream is = IOHelper.buffered(new FileInputStream(file));
        XMLStreamReader r = new StaxConverter().createXMLStreamReader(is, exchange);
        return new StAXSource(r);
    }
View Full Code Here

        assertEquals("<foo>bar</foo>", conv.toString(out, null));
    }
    public void testToDomSourceByStAXSource() throws Exception {
        XmlConverter conv = new XmlConverter();

        StAXSource source = conv.toStAXSource("<foo>bar</foo>", null);
        DOMSource out = conv.toDOMSource(source);
        assertNotSame(source, out);

        assertEquals("<foo>bar</foo>", conv.toString(out, null));
    }
View Full Code Here

TOP

Related Classes of javax.xml.transform.stax.StAXSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.