Examples of selectSingleNode()


Examples of ca.ecliptical.emf.xpath.EMFDOMXPath.selectSingleNode()

    fixture.getWriters().add(writer2);
  }

  public final void testSelectChildWithPredicate() throws Exception {
    EMFDOMXPath xpath = new EMFDOMXPath("books[@title='Book 1']");
    Book book = (Book) xpath.selectSingleNode(fixture);
    assertNotNull(book);
    assertEquals("Book 1", book.getTitle());
  }

  public final void testStringValueOf() throws Exception {
View Full Code Here

Examples of ca.ecliptical.emf.xpath.EMFXPath.selectSingleNode()

  }

  public final void testSelectChildWithPredicate() throws Exception {
    EMFXPath xpath = new EMFXPath("lib:books[lib:title='Book 1']");
    xpath.addNamespace("lib", LibraryPackage.eNS_URI);
    Book book = (Book) xpath.selectSingleNode(fixture);
    assertNotNull(book);
    assertEquals("Book 1", book.getTitle());
  }

  public final void testNonContainmentRef() throws Exception {
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlElement.selectSingleNode()

        HtmlForm form = page.getFormByName("parameters");

        HtmlElement element = (HtmlElement) form.selectSingleNode("//tr[td/div/input/@value='string']");
        assertNotNull(element);
        assertEquals("string description", ((HtmlElement) element.selectSingleNode("td/div")).getAttribute("description"));
        HtmlTextInput stringParameterInput = (HtmlTextInput) element.selectSingleNode(".//input[@name='value']");
        assertEquals("defaultValue", stringParameterInput.getAttribute("value"));
        assertEquals("string", ((HtmlElement) element.selectSingleNode("td[@class='setting-name']")).getTextContent());
        stringParameterInput.setAttribute("value", "newValue");
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlForm.selectSingleNode()

        wc.setThrowExceptionOnFailingStatusCode(false);
        HtmlPage page = wc.goTo("/job/" + project.getName() + "/build?delay=0sec");

        HtmlForm form = page.getFormByName("parameters");

        HtmlElement element = (HtmlElement) form.selectSingleNode("//tr[td/div/input/@value='string']");
        assertNotNull(element);
        assertEquals("string description", ((HtmlElement) element.selectSingleNode("td/div")).getAttribute("description"));
        HtmlTextInput stringParameterInput = (HtmlTextInput) element.selectSingleNode(".//input[@name='value']");
        assertEquals("defaultValue", stringParameterInput.getAttribute("value"));
        assertEquals("string", ((HtmlElement) element.selectSingleNode("td[@class='setting-name']")).getTextContent());
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlPage.selectSingleNode()

     * Nested optional blocks
     */
    public void test1() throws Exception {
        HtmlPage p = createWebClient().goTo("self/test1");

        HtmlElement outer = (HtmlElement)p.selectSingleNode("//INPUT[@name='outer']");
        HtmlElement inner = (HtmlElement)p.selectSingleNode("//INPUT[@name='inner']");
        HtmlInput field = (HtmlInput)p.selectSingleNode("//INPUT[@type='text'][@name='_.field']");

        // outer gets unfolded, but inner should be still folded
        outer.click();
View Full Code Here

Examples of com.volantis.mcs.eclipse.common.odom.xpath.ODOMXPath.selectSingleNode()

    private void assertSelectFromODOMObservable(ODOMObservable odomObservable)
            throws XPathException {
        ODOMXPath xpath = new ODOMXPath(odomObservable);
        assertEquals("selected odomObservable", odomObservable,
                     xpath.selectSingleNode(doc));
    }


    /**
     * Mock ODOMXPath object that:
View Full Code Here

Examples of com.volantis.mcs.xml.xpath.XPath.selectSingleNode()

                    });

            Element policyElement = null;
            try {
                policyElement =
                        (Element) xpath.selectSingleNode(definitionsRoot);
            } catch (XPathException e) {
                throw new IllegalArgumentException("Cannot find policy " +
                        "element named " + policy);
            }
View Full Code Here

Examples of oracle.xml.parser.v2.XMLNode.selectSingleNode()

     */
    public Node selectSingleNodeAdvanced(Node contextNode, String xPath, XMLNamespaceResolver xmlNamespaceResolver) throws XMLPlatformException {
        try {
            XMLNode xmlNode = (XMLNode)contextNode;
            XDKNamespaceResolver xdkNamespaceResolver = new XDKNamespaceResolver(xmlNamespaceResolver);
            return xmlNode.selectSingleNode(xPath, xdkNamespaceResolver);
        } catch (XSLException e) {
            throw XMLPlatformException.xmlPlatformInvalidXPath(e);
        }
    }

View Full Code Here

Examples of org.apache.abdera.xpath.XPath.selectSingleNode()

    assertEquals(xpath.evaluate("count(/a:feed)", feed), 1.0d);
    assertTrue(xpath.booleanValueOf("/a:feed/a:entry", feed));
    assertEquals(xpath.numericValueOf("count(/a:feed)", feed), 1.0d);
    assertEquals(xpath.valueOf("/a:feed/a:entry/a:title", feed), "Atom-Powered Robots Run Amok");
    assertEquals(xpath.selectNodes("/a:feed/a:entry", feed).size(), 1);
    assertTrue(xpath.selectSingleNode("/a:feed", feed) instanceof Feed);
    assertEquals(xpath.selectSingleNode("..", feed.getTitleElement()), feed);
    assertEquals(xpath.selectSingleNode("ancestor::*", feed.getEntries().get(0)), feed);
    assertEquals(xpath.valueOf("concat('The feed is is ',/a:feed/a:id)", feed), "The feed is is urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6");
   
  }
View Full Code Here

Examples of org.apache.axiom.om.xpath.AXIOMXPath.selectSingleNode()

                        "file:src/test/resources/org/apache/synapse/core/registry/resource.xml");

        assertNotNull(omNode);

        AXIOMXPath xpath = new AXIOMXPath("//table/entry[@id='one']/value/child::text()");
        OMNode node = (OMNode) xpath.selectSingleNode(omNode);

        assertNotNull(node);
        assertTrue(node instanceof OMText);
        assertEquals("ValueOne", ((OMText) node).getText());
    }
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.