Package org.apache.cxf.staxutils.AbstractDOMStreamReader

Examples of org.apache.cxf.staxutils.AbstractDOMStreamReader.ElementFrame


    /**
     * @param element
     */
    public W3CDOMStreamReader(Element element) {
        super(new ElementFrame(element, null));
        newFrame(getCurrentFrame());
               
        this.document = element.getOwnerDocument();
    }
View Full Code Here


        newFrame(getCurrentFrame());
               
        this.document = element.getOwnerDocument();
    }
    public W3CDOMStreamReader(Document doc) {
        super(new ElementFrame(doc));
        this.document = doc;
    }
View Full Code Here

        return (Element)getCurrentFrame().element;
    }

    @Override
    protected ElementFrame getChildFrame(int currentChild) {
        return new ElementFrame(getCurrentNode().getChildNodes().item(currentChild), getCurrentFrame());
    }
View Full Code Here

    @Override
    public String getElementText() throws XMLStreamException {
        String result = DOMUtils.getContent(content);

        ElementFrame frame = getCurrentFrame();
        frame.ended = true;
        currentEvent = END_ELEMENT;
        endElement();

        // we should not return null according to the StAx API javadoc
View Full Code Here

        return result != null ? result : "";
    }

    @Override
    public String getNamespaceURI(String prefix) {
        ElementFrame frame = getCurrentFrame();

        while (null != frame) {
            int index = frame.prefixes.indexOf(prefix);
            if (index != -1) {
                return frame.uris.get(index);
            }

            if (frame.parent == null) {
                return ((Element)frame.getElement()).lookupNamespaceURI(prefix);
            }
            frame = frame.parent;
        }

        return null;
View Full Code Here

    /**
     * @param element
     */
    public W3CDOMStreamReader(Element element) {
        super(new ElementFrame(element, null));
        newFrame(getCurrentFrame());
               
        this.document = element.getOwnerDocument();
    }
View Full Code Here

        return (Element)getCurrentFrame().element;
    }

    @Override
    protected ElementFrame getChildFrame(int currentChild) {
        return new ElementFrame(getCurrentElement().getChildNodes().item(currentChild), getCurrentFrame());
    }
View Full Code Here

    @Override
    public String getElementText() throws XMLStreamException {
        String result = DOMUtils.getContent(content);

        ElementFrame frame = getCurrentFrame();
        frame.ended = true;
        currentEvent = END_ELEMENT;
        endElement();

        // we should not return null according to the StAx API javadoc
View Full Code Here

        return result != null ? result : "";
    }

    @Override
    public String getNamespaceURI(String prefix) {
        ElementFrame frame = getCurrentFrame();

        while (null != frame) {
            int index = frame.prefixes.indexOf(prefix);
            if (index != -1) {
                return frame.uris.get(index);
            }

            if (frame.parent == null) {
                return ((Element)frame.getElement()).lookupNamespaceURI(prefix);
            }
            frame = frame.parent;
        }

        return null;
View Full Code Here

    /**
     * @param element
     */
    public W3CDOMStreamReader(Element element) {
        super(new ElementFrame(element, null));
        newFrame(getCurrentFrame());
               
        this.document = element.getOwnerDocument();
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.staxutils.AbstractDOMStreamReader.ElementFrame

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.