Package org.w3c.dom

Examples of org.w3c.dom.NodeList


    }


    // recursive travel through all childs
    NodeList childs = element.getChildNodes();

    for (int i=0; i<childs.getLength(); i++) {
      if (childs.item(i) instanceof Element) {
  collectInputFields((Element)childs.item(i),fh);
      }
    }
   
  }
View Full Code Here


                    Object obj4 = it4.next();
                    if (obj4 instanceof SOAPBodyElement) {
                      SOAPBodyElement soapBodyElement = (SOAPBodyElement) obj4;
                      System.out.println("5: \t" + soapBodyElement.getNodeName());
                      Iterator it5 = soapBodyElement.getChildElements();
                      NodeList nl =  soapBodyElement.getChildNodes();
                      if (nl != null) {
                        for (int i = 0; i < nl.getLength(); i++) {
                          System.out.println("6: \t\t" + nl.item(i).getNodeName());
                        }
                      }
                      /*Object obj5 = it5.next();
                      SOAPElement element = (SOAPElement) obj5;
                      String name = element.getNodeName();
View Full Code Here

      log.info("Ignore tag name: "+name);
    }
   
   
    // recursive travel through all childs
    NodeList childs = element.getChildNodes();
   
    for (int i=0; i<childs.getLength(); i++) {
      if (childs.item(i) instanceof Element) {
        extractLinks((Element)childs.item(i),links);
      }
    }
   
  }
View Full Code Here

      // IMAGE SRC=
      addLink(element.getAttribute("src"),links);
    }
   
    // recursive travel through all childs
    NodeList childs = element.getChildNodes();
   
    for (int i=0; i<childs.getLength(); i++) {
      if (childs.item(i) instanceof Element) {
        extractImageLinks((Element)childs.item(i),links);
      }
    }
   
  }
View Full Code Here

      elementList.add(element);
    }
   
   
    // recursive travel through all childs
    NodeList childs = element.getChildNodes();
   
    for (int i=0; i<childs.getLength(); i++) {
      if (childs.item(i) instanceof Element) {
        extractElements((Element)childs.item(i),type,elementList);
      }
    }
   
  }
View Full Code Here

            showExemple(xpath + "@"+att.getExpandedName());
          }
         

          //parcoure des nodes
          NodeList nl =  n.getChildNodes();
          for (int i = 0; i < nl.getLength(); i++) {
             XMLNode theNode = (XMLNode) nl.item(i);
             if (theNode.getNodeName().compareTo("#text")!=0) {
               if (theNode.getNodeName().compareTo("#document")!=0){
               infoNode(theNode , xpath + theNode.getNodeName()+"/");
               } else {
               infoNode(theNode , xpath );
View Full Code Here

    /**
     * return the text content of an element
     */
    public static String getTextContent(org.w3c.dom.Node element) {
        StringBuffer childtext = new StringBuffer();
        NodeList childlist = element.getChildNodes();
        int ct = childlist.getLength();

        for (int j = 0; j < ct; j++) {
            org.w3c.dom.Node childNode = childlist.item(j);

            if ((childNode.getNodeType() == Node.TEXT_NODE) ||
                    (childNode.getNodeType() == Node.CDATA_SECTION_NODE)) {
                childtext.append(childNode.getNodeValue().trim());
            }
View Full Code Here

      }
    }

    // recursive travel through all childs
    NodeList childs = node.getChildNodes();

    for (int i=0; i<childs.getLength(); i++) {
      rewriteDOM(childs.item(i),url);
    }
   

  }
View Full Code Here

   * @param o the object that is serialized into XML
   * @throws Exception if post-processing fails
   */
  protected void writePostProcess(Object o) throws Exception {
    Element         root;
    NodeList        list;
    Element         conns;
    Element         child;
    int             i;

    // since not all BeanConnections get saved to XML (e.g., MetaBeans in the
    // UserToolBar) if one saves a layout, the numbering in the Vector of the
    // BeanConnections is not correct. The "name" attribute of the nodes has
    // to be modified
    if (getDataType() == DATATYPE_LAYOUT) {
      root  = m_Document.getDocument().getDocumentElement();
      conns = (Element) root.getChildNodes().item(INDEX_BEANCONNECTIONS);
      list  = conns.getChildNodes();
      for (i = 0; i < list.getLength(); i++) {
        child = (Element) list.item(i);
        child.setAttribute(ATT_NAME, "" + i);
      }
    }
  }
View Full Code Here

   * @return the processed object
   * @throws Exception if post-processing fails
   * @see #m_BeanInstances
   */
  protected Document readPreProcess(Document document) throws Exception {
    NodeList        list;
    int             i;
    Element         node;
    String          clsName;
    Vector          children;
    int             id;
    int             n;
    Element         child;
   
    m_BeanInstances   = new Vector();
    m_BeanInstancesID = new Vector();
   
    // get all BeanInstance nodes
    list    = document.getElementsByTagName("*");
    clsName = BeanInstance.class.getName();
    for (i = 0; i < list.getLength(); i++) {
      node = (Element) list.item(i);
     
      // is it a BeanInstance?
      if (node.getAttribute(ATT_CLASS).equals(clsName)) {
        children = XMLDocument.getChildTags(node);
        id       = m_BeanInstancesID.size();
View Full Code Here

TOP

Related Classes of org.w3c.dom.NodeList

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.