Package mf.javax.xml.transform.stax

Examples of mf.javax.xml.transform.stax.StAXSource


                Node node = (Node) domSource.getNode();
                String systemID = domSource.getSystemId();         
                xmlInputSources[i] = new DOMInputSource(node, systemID);
            }
            else if (source instanceof StAXSource) {
                StAXSource staxSource = (StAXSource) source;
                XMLEventReader eventReader = staxSource.getXMLEventReader();
                if (eventReader != null) {
                    xmlInputSources[i] = new StAXInputSource(eventReader);
                }
                else {
                    xmlInputSources[i] = new StAXInputSource(staxSource.getXMLStreamReader());
                }
            }
            else if (source == null) {
                throw new NullPointerException(JAXPValidationMessageFormatter.formatMessage(fXMLSchemaLoader.getLocale(),
                        "SchemaSourceArrayMemberNull", null));
View Full Code Here


     */

    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) {
                        fStreamHelper = new StreamHelper();
                    }
                    fStreamHelper.validate(streamReader, staxResult);
                }
                else {
                    // Hand off to XMLEventReader helper.
                    if (fEventHelper == null) {
                        fEventHelper = new EventHelper();
                    }
                    fEventHelper.validate(staxSource.getXMLEventReader(), staxResult);
                }
            }
            catch (XMLStreamException e) {
                throw new SAXException(e);
            }
View Full Code Here

TOP

Related Classes of mf.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.