Examples of DepthXMLStreamReader


Examples of org.apache.cxf.staxutils.DepthXMLStreamReader

                @SuppressWarnings("unchecked")
                final Map.Entry<String, String> namespaces[]
                    = nsMap.entrySet().toArray(new Map.Entry[nsMap.size()]);
                //OK. we have extra namespaces.  We'll need to wrapper the reader
                //with a new one that will fake extra namespace events
                source = new DepthXMLStreamReader(source) {
                    public int getNamespaceCount() {
                        if (getDepth() == 0 && isStartElement()) {
                            return super.getNamespaceCount() + nsMap.size();
                        }
                        return super.getNamespaceCount();
View Full Code Here

Examples of org.codehaus.xfire.util.stax.DepthXMLStreamReader

    public void doSkipTest() throws Exception
    {
        XMLStreamReader reader = STAXUtils.createXMLStreamReader(getClass().getResourceAsStream("/org/codehaus/xfire/util/nowhitespace.xml"),null,null);
        //XMLStreamReader reader = ifactory.createXMLStreamReader(getClass().getResourceAsStream("/org/codehaus/xfire/util/nowhitespace.xml"));
       
        DepthXMLStreamReader dr = new DepthXMLStreamReader(reader);
        STAXUtils.toNextElement(dr);
        assertEquals("Envelope", dr.getLocalName());
        dr.next();
        STAXUtils.toNextElement(dr);
        assertEquals("Header", dr.getLocalName());
    }
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.