common_helper/src/main/java/com/xiongyingqi/util/xml/StaxUtils.java
public static XMLEventWriter getXMLEventWriter(Result result) {
        if (result instanceof StAXResult) {
            return ((StAXResult) result).getXMLEventWriter();
        } else if (result instanceof StaxResult) {
            return ((StaxResult) result).getXMLEventWriter();
        } else {
            throw new IllegalArgumentException("Result '" + result + "' is neither StaxResult nor StAXResult");
        }
    }
public static XMLEventWriter getXMLEventWriter(Result result) {
        if (result instanceof StAXResult) {
            return ((StAXResult) result).getXMLEventWriter();
        } else if (result instanceof StaxResult) {
            return ((StaxResult) result).getXMLEventWriter();
        } else {
            throw new IllegalArgumentException("Result '" + result + "' is neither StaxResult nor StAXResult");
        }
    }
public static XMLEventWriter getXMLEventWriter ( Result result ) { if ( result instanceof StAXResult ) { return ( ( StAXResult ) result ) . getXMLEventWriter ( ) ; } else if ( result instanceof StaxResult ) { return ( ( StaxResult ) result ) . getXMLEventWriter ( ) ; } else { throw new IllegalArgumentException ( "Result '" + result + "' is neither StaxResult nor StAXResult" ) ; } }
Return the {@link javax.xml.stream.XMLEventWriter} for the given StAX Result.

@param result a JAXP 1.4 {@link javax.xml.transform.stax.StAXResult}
@return the {@link javax.xml.stream.XMLStreamReader}
@throws IllegalArgumentException if {@code source} isn't a JAXP 1.4 {@link javax.xml.transform.stax.StAXResult}
or custom StAX Result
Return the { @link javax . xml . stream . XMLEventWriter } for the given StAX Result .