Examples of StAXResult


Examples of javax.xml.transform.stax.StAXResult

     */
    @SuppressWarnings("unchecked")
    protected <T extends Result>T createStAXResult(
            Class<T> resultClass) throws SQLException {

        StAXResult result = null;

        try {
            this.domResult =
                new DOMResult((new SAX2DOMBuilder()).getDocument());

            XMLOutputFactory factory = XMLOutputFactory.newInstance();
            XMLStreamWriter xmlStreamWriter =
                factory.createXMLStreamWriter(this.domResult);

            if (resultClass == null || resultClass == StAXResult.class) {
                result = new StAXResult(xmlStreamWriter);
            } else {
                Constructor ctor =
                    resultClass.getConstructor(XMLStreamWriter.class);

                result = (StAXResult) ctor.newInstance(xmlStreamWriter);
View Full Code Here

Examples of javax.xml.transform.stax.StAXResult

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

    private static Result createStaxResult(XMLStreamWriter streamWriter) {
      return new StAXResult(streamWriter);
    }
View Full Code Here

Examples of javax.xml.transform.stax.StAXResult

    private static Result createStaxResult(XMLStreamWriter streamWriter) {
      return new StAXResult(streamWriter);
    }

    private static Result createStaxResult(XMLEventWriter eventWriter) {
      return new StAXResult(eventWriter);
    }
View Full Code Here

Examples of javax.xml.transform.stax.StAXResult

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

    private static Result createStaxResult(XMLStreamWriter streamWriter) {
      return new StAXResult(streamWriter);
    }
View Full Code Here

Examples of javax.xml.transform.stax.StAXResult

    private static Result createStaxResult(XMLStreamWriter streamWriter) {
      return new StAXResult(streamWriter);
    }

    private static Result createStaxResult(XMLEventWriter eventWriter) {
      return new StAXResult(eventWriter);
    }
View Full Code Here

Examples of javax.xml.transform.stax.StAXResult

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

    private static Result createStaxResult(XMLStreamWriter streamWriter) {
      return new StAXResult(streamWriter);
    }
View Full Code Here

Examples of javax.xml.transform.stax.StAXResult

    private static Result createStaxResult(XMLStreamWriter streamWriter) {
      return new StAXResult(streamWriter);
    }

    private static Result createStaxResult(XMLEventWriter eventWriter) {
      return new StAXResult(eventWriter);
    }
View Full Code Here

Examples of javax.xml.transform.stax.StAXResult

    public void validate(Source source, Result result) throws SAXException,
            IOException {
        if (result instanceof StAXResult || result == null) {
            StAXSource staxSource = (StAXSource) source;
            StAXResult staxResult = (StAXResult) result;
            try {
                XMLStreamReader streamReader = staxSource.getXMLStreamReader();
                if (streamReader != null) {
                    // Hand off to XMLStreamReader helper.
                    if (fStreamHelper == null) {
View Full Code Here

Examples of javax.xml.transform.stax.StAXResult

     */
    @SuppressWarnings("unchecked")
    protected <T extends Result>T createStAXResult(
            Class<T> resultClass) throws SQLException {

        StAXResult result = null;

        try {
            this.domResult =
                new DOMResult((new SAX2DOMBuilder()).getDocument());

            XMLOutputFactory factory = XMLOutputFactory.newInstance();
            XMLStreamWriter xmlStreamWriter =
                factory.createXMLStreamWriter(this.domResult);

            if (resultClass == null || resultClass == StAXResult.class) {
                result = new StAXResult(xmlStreamWriter);
            } else {
                Constructor ctor =
                    resultClass.getConstructor(XMLStreamWriter.class);

                result = (StAXResult) ctor.newInstance(xmlStreamWriter);
View Full Code Here

Examples of javax.xml.transform.stax.StAXResult

      try {
        if (this.outputFactory == null) {
          this.outputFactory = XMLOutputFactory.newInstance();
        }

        return new StAXResult(this.outputFactory
            .createXMLEventWriter(setCharacterStreamInternal()));
      } catch (XMLStreamException ex) {
        SQLException sqlEx = SQLError.createSQLException(ex
            .getMessage(), SQLError.SQL_STATE_ILLEGAL_ARGUMENT, this.exceptionInterceptor);
        sqlEx.initCause(ex);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.