Examples of nsIDOMNode


Examples of org.mozilla.interfaces.nsIDOMNode

//        <a href="/p/forklabs-javaxpcom/" onclick="cancelBubble=true;">Project&nbsp;Home</a>
//      </div>
//    </div>
//  </th>
   protected String exploreTableCell(nsIDOMHTMLTableCellElement cell) {
      nsIDOMNode anchor = cell.getElementsByTagName("a").item(0L);
      nsIDOMNode text = anchor.getFirstChild();
      String value = text.getNodeValue();
      return value;
      }
View Full Code Here

Examples of org.mozilla.interfaces.nsIDOMNode

   @Test
   public void testGetAllChildren() {
      Mockery context = new Mockery();

   // <p>This is <em>a simple</em> test <strong>with many children</strong></p>
      final nsIDOMNode p = context.mock(nsIDOMNode.class, "p");
      final nsIDOMNode text1 = context.mock(nsIDOMNode.class, "text1");
      final nsIDOMNode em = context.mock(nsIDOMNode.class, "em");
      final nsIDOMNode text2 = context.mock(nsIDOMNode.class, "text2");
      final nsIDOMNode text3 = context.mock(nsIDOMNode.class, "text3");
      final nsIDOMNode strong = context.mock(nsIDOMNode.class, "strong");
      final nsIDOMNode text4 = context.mock(nsIDOMNode.class, "text4");

      final nsIDOMNodeList p_children = context.mock(nsIDOMNodeList.class, "p_children");
      final nsIDOMNodeList em_children = context.mock(nsIDOMNodeList.class, "em_children");
      final nsIDOMNodeList strong_children = context.mock(nsIDOMNodeList.class, "strong_children");
View Full Code Here

Examples of org.mozilla.interfaces.nsIDOMNode

      String value = text.getNodeValue();
      return value;
      }

   protected void exploreMainMenu() {
      nsIDOMNode node = this.getElementById("mt");
      nsIDOMHTMLTableElement table = this.asTable(node);

      System.out.println("=== Inspecting the table node ===");
      inspect(table);
View Full Code Here

Examples of org.mozilla.interfaces.nsIDOMNode

//        <a href="/p/forklabs-javaxpcom/" onclick="cancelBubble=true;">Project&nbsp;Home</a>
//      </div>
//    </div>
//  </th>
   protected String exploreTableCell(nsIDOMHTMLTableCellElement cell) {
      nsIDOMNode anchor = cell.getElementsByTagName("a").item(0L);
      String value = this.getTextFrom(anchor);
      return value;
      }
View Full Code Here

Examples of org.mozilla.interfaces.nsIDOMNode

      String value = this.getTextFrom(anchor);
      return value;
      }

   protected void exploreMainMenu() {
      nsIDOMNode node = this.getElementById("mt");
      nsIDOMHTMLTableElement table = asTable(node);

      System.out.println("=== Inspecting the table node ===");
      inspect(table);
View Full Code Here

Examples of org.mozilla.interfaces.nsIDOMNode

         sb.append(text);
         }

      nsIDOMNodeList children = node.getChildNodes();
      for (long i = 0, len = children.getLength(); i < len; i++) {
         nsIDOMNode child = children.item(i);
         String text = this.getTextFrom(child);
         sb.append(text);
         }

      String text = sb.toString();
View Full Code Here

Examples of org.mozilla.interfaces.nsIDOMNode

      String value = XPCOMConverter.asPlainText(anchor);
      return value;
      }

   protected void exploreMainMenu() {
      nsIDOMNode node = this.getElementById("mt");
      nsIDOMHTMLDivElement div = asDiv(node);

      System.out.println("=== Inspecting the div node ===");
      inspect(div);
View Full Code Here

Examples of org.mozilla.interfaces.nsIDOMNode

   /**
    * Creates a selector on the document and its children.
    * @return   the selector.
    */
   public Selector selector() {
      nsIDOMNode document = this.getDocument();
      Selector selector = this.selector(document);
      return selector;
      }
View Full Code Here

Examples of org.mozilla.interfaces.nsIDOMNode

      boolean has_children = node.hasChildNodes();
      if (has_children) {
         nsIDOMNodeList child_nodes = node.getChildNodes();
         for (long l = 0, len = child_nodes.getLength(); l < len; l++) {
         // child will be added in the list of children
            nsIDOMNode child = child_nodes.item(l);
            List<nsIDOMNode> children = this.getAllChildren(child);
            list.addAll(children);
            }
         }
View Full Code Here

Examples of org.mozilla.interfaces.nsIDOMNode

    * the filters.
    * @return   the list of nodes that match the filters.
    */
   @SuppressWarnings("hiding")
   public List<nsIDOMNode> list() {
      nsIDOMNode root = this.getRoot();
      List<nsIDOMNode> candidates = this.getAllChildren(root);

      List<UnaryPredicate<nsIDOMNode>> filters = this.getFilters();
      for (UnaryPredicate<nsIDOMNode> filter : filters) {
         Algorithm.removeIf(candidates, Predicates.not1(filter));
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.