Package org.apache.excalibur.xml.xpath

Examples of org.apache.excalibur.xml.xpath.XPathProcessor.selectNodeList()


                    processor = (XPathProcessor)this.manager.lookup(XPathProcessor.ROLE);

                    InputSource input = SourceUtil.getInputSource(source);

                    Document document = parser.parseDocument(input);
                    NodeList list = processor.selectNodeList(document, select);
                    int length = list.getLength();
                    for (int i=0; i<length; i++) {
                          IncludeXMLConsumer.includeNode((Node)list.item(i),
                                               (ContentHandler)this, 
                                               (LexicalHandler)this);
View Full Code Here


                XPathProcessor processor = null;
                try {
                    processor = (XPathProcessor)manager.lookup(XPathProcessor.ROLE);

                    NodeList nodelist = processor.selectNodeList(doc.getDocumentElement(), this.xpath);

                    SourceProperty property = new SourceProperty(this.propertynamespace, this.propertyname);
                    property.setValue(nodelist);

                    return property;
View Full Code Here

            if (doc != null) {
                XPathProcessor processor = null;
                try {
                    processor = (XPathProcessor)manager.lookup(XPathProcessor.ROLE);
                    NodeList nodelist = processor.selectNodeList(doc.getDocumentElement(), m_xpath);
                    SourceProperty property = new SourceProperty(m_namespace, m_propertyname);
                    property.setValue(nodelist);
                    return property;
                } catch (ServiceException se) {
                    this.getLogger().error("Could not retrieve component", se);
View Full Code Here

            node = processor.selectSingleNode(document1, expr);
            assertNull("Must be null", node);

            // 3. Test multiple node expression
            expr = "/test:root/test:*";
            NodeList list = processor.selectNodeList(document1, expr);
            assertNotNull("Must select two nodes, but got null", list);
            assertEquals("Must select two nodes", 2, list.getLength());
            assertEquals("Must select <test:element1/> node", "element1", list.item(0).getLocalName());
            assertEquals("Must select <test:element2/> node", "element2", list.item(1).getLocalName());

View Full Code Here

                    processor = (XPathProcessor)this.manager.lookup(XPathProcessor.ROLE);

                    InputSource input = SourceUtil.getInputSource(source);

                    Document document = parser.parseDocument(input);
                    NodeList list = processor.selectNodeList(document, select);
                    int length = list.getLength();
                    for (int i=0; i<length; i++) {
                          IncludeXMLConsumer.includeNode(list.item(i),
                                               this, 
                                               this);
View Full Code Here

            if (doc != null) {
                XPathProcessor processor = null;
                try {
                    processor = (XPathProcessor)manager.lookup(XPathProcessor.ROLE);
                    NodeList nodelist = processor.selectNodeList(doc.getDocumentElement(), m_xpath);
                    SourceProperty property = new SourceProperty(m_namespace, m_propertyname);
                    property.setValue(nodelist);
                    return property;
                } catch (ServiceException se) {
                    this.getLogger().error("Could not retrieve component", se);
View Full Code Here

                    processor = (XPathProcessor)this.manager.lookup(XPathProcessor.ROLE);

                    InputSource input = SourceUtil.getInputSource(source);

                    Document document = parser.parseDocument(input);
                    NodeList list = processor.selectNodeList(document, select);
                    int length = list.getLength();
                    for (int i=0; i<length; i++) {
                          IncludeXMLConsumer.includeNode((Node)list.item(i),
                                               (ContentHandler)this, 
                                               (LexicalHandler)this);
View Full Code Here

                    processor = (XPathProcessor)this.manager.lookup(XPathProcessor.ROLE);

                    InputSource input = SourceUtil.getInputSource(source);

                    Document document = parser.parseDocument(input);
                    NodeList list = processor.selectNodeList(document, select);
                    int length = list.getLength();
                    for (int i=0; i<length; i++) {
                          IncludeXMLConsumer.includeNode(list.item(i),
                                               this,
                                               this);
View Full Code Here

                XPathProcessor processor = null;
                try {
                    processor = (XPathProcessor)manager.lookup(XPathProcessor.ROLE);

                    NodeList nodelist = processor.selectNodeList(doc.getDocumentElement(), this.xpath);

                    SourceProperty property = new SourceProperty(this.propertynamespace, this.propertyname);
                    property.setValue(nodelist);

                    return property;
View Full Code Here

            try {
                xpathProcessor = (XPathProcessor)manager.lookup(XPathProcessor.ROLE);
            } catch (Exception e) {
                throw new SAXException("XPointerPart: error looking up XPathProcessor.", e);
            }
            NodeList nodeList = xpathProcessor.selectNodeList(document, expression, xpointerContext);
            if (nodeList.getLength() > 0) {
                XMLConsumer consumer = xpointerContext.getXmlConsumer();
                LocatorImpl locator = new LocatorImpl();
                locator.setSystemId(xpointerContext.getSource().getURI());
                consumer.setDocumentLocator(locator);
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.