common_helper/src/main/java/com/xiongyingqi/util/xml/StaxUtils.java
public static XMLEventReader getXMLEventReader(Source source) {
        if (source instanceof StAXSource) {
            return ((StAXSource) source).getXMLEventReader();
        } else if (source instanceof StaxSource) {
            return ((StaxSource) source).getXMLEventReader();
        } else {
            throw new IllegalArgumentException("Source '" + source + "' is neither StaxSource nor StAXSource");
        }
    }
public static XMLEventReader getXMLEventReader(Source source) {
        if (source instanceof StAXSource) {
            return ((StAXSource) source).getXMLEventReader();
        } else if (source instanceof StaxSource) {
            return ((StaxSource) source).getXMLEventReader();
        } else {
            throw new IllegalArgumentException("Source '" + source + "' is neither StaxSource nor StAXSource");
        }
    }
Return the {@link javax.xml.stream.XMLEventReader} for the given StAX Source.

@param source a JAXP 1.4 {@link javax.xml.transform.stax.StAXSource}
@return the {@link javax.xml.stream.XMLEventReader}
@throws IllegalArgumentException if {@code source} isn't a JAXP 1.4 {@link javax.xml.transform.stax.StAXSource}
or custom StAX Source