Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.XmlObject.selectPath()


    protected abstract String getRootElementName();

    protected CTGroupShape getSpTree(){
        if(_spTree == null) {
            XmlObject root = getXmlObject();
            XmlObject[] sp = root.selectPath(
                    "declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main' .//*/p:spTree");
            if(sp.length == 0) throw new IllegalStateException("CTGroupShape was not found");
            _spTree = (CTGroupShape)sp[0];
        }
        return _spTree;
View Full Code Here


    public boolean evaluate(Message message) throws JMSException {
        if( message instanceof TextMessage ) {
            String text = ((TextMessage)message).getText();
            try {
                XmlObject object = XmlObject.Factory.parse(text);
                XmlObject[] objects = object.selectPath(xpath);
                return object!=null && objects.length>0;                      
            } catch (Throwable e) {
                return false;
            }
           
View Full Code Here

            BytesMessage bm = (BytesMessage) message;
            byte data[] = new byte[(int) bm.getBodyLength()];
            bm.readBytes(data);
            try {
                XmlObject object = XmlObject.Factory.parse(new ByteArrayInputStream(data));
                XmlObject[] objects = object.selectPath(xpath);
                return object!=null && objects.length>0;                      
            } catch (Throwable e) {
                return false;
            }
        }           
View Full Code Here

            String namespaces = declareXPathNamespaces(xmlObject);
            if (namespaces != null && namespaces.trim().length() > 0)
                xpath = namespaces + xpath;

            XmlObject[] path = xmlObject.selectPath(xpath);
            for (XmlObject xml : path) {
                setNodeValue(xml.getDomNode(), value);
            }

            return xmlObject.toString();
View Full Code Here

            String namespaces = declareXPathNamespaces(xmlObject);
            if (namespaces != null && namespaces.trim().length() > 0)
                xpath = namespaces + xpath;

            XmlObject[] path = xmlObject.selectPath(xpath);
            for (XmlObject xml : path) {
                setNodeValue(xml.getDomNode(), value);
            }

            return xmlObject.toString();
View Full Code Here

    public boolean evaluate(Message message) throws JMSException {
        if (message instanceof TextMessage) {
            String text = ((TextMessage)message).getText();
            try {
                XmlObject object = XmlObject.Factory.parse(text);
                XmlObject[] objects = object.selectPath(xpath);
                return object != null && objects.length > 0;
            } catch (Throwable e) {
                return false;
            }
View Full Code Here

            BytesMessage bm = (BytesMessage)message;
            byte data[] = new byte[(int)bm.getBodyLength()];
            bm.readBytes(data);
            try {
                XmlObject object = XmlObject.Factory.parse(new ByteArrayInputStream(data));
                XmlObject[] objects = object.selectPath(xpath);
                return object != null && objects.length > 0;
            } catch (Throwable e) {
                return false;
            }
        }
View Full Code Here

        }
    }

    private void read(InputStream is) throws Exception {
        XmlObject obj = XmlObject.Factory.parse(is);
        for (XmlObject def : obj.selectPath("*/*")) {

            String name = def.getDomNode().getLocalName();
            CTCustomGeometry2D geom = CTCustomGeometry2D.Factory.parse(def.toString());

            if(containsKey(name)) {
View Full Code Here

              new EvilUnclosedBRFixingInputStream(is)
        );

        _qnames = new ArrayList<QName>();
        _items = new ArrayList<XmlObject>();
        for(XmlObject obj : root.selectPath("$this/xml/*")) {
            Node nd = obj.getDomNode();
            QName qname = new QName(nd.getNamespaceURI(), nd.getLocalName());
            if (qname.equals(QNAME_SHAPE_LAYOUT)) {
                _items.add(CTShapeLayout.Factory.parse(obj.xmlText()));
            } else if (qname.equals(QNAME_SHAPE_TYPE)) {
View Full Code Here

    protected abstract String getRootElementName();

    protected CTGroupShape getSpTree(){
        if(_spTree == null) {
            XmlObject root = getXmlObject();
            XmlObject[] sp = root.selectPath(
                    "declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main' .//*/p:spTree");
            if(sp.length == 0) throw new IllegalStateException("CTGroupShape was not found");
            _spTree = (CTGroupShape)sp[0];
        }
        return _spTree;
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.