Examples of NodeList


Examples of org.w3c.dom.NodeList

      // 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

Examples of org.w3c.dom.NodeList

      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

Examples of org.w3c.dom.NodeList

            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

Examples of org.w3c.dom.NodeList

    /**
     * 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

Examples of org.w3c.dom.NodeList

      }
    }

    // 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

Examples of org.w3c.dom.NodeList

   * @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

Examples of org.w3c.dom.NodeList

   * @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

Examples of org.w3c.dom.NodeList

            DocumentBuilderFactory fact = DocumentBuilderFactory.newInstance();
            fact.setNamespaceAware(true);
            DocumentBuilder bldr = fact.newDocumentBuilder();
            doc = bldr.parse(m_wsdlProvider.getWSDL(req));
            Element schema = doc.getDocumentElement();
            NodeList services = schema.getElementsByTagNameNS(WSDLSOAP_NAMESPACE, "address");
            for (int i = 0; i < services.getLength(); i++) {
                Node node = services.item(i).getAttributes().getNamedItem("location");
                if (node != null) {
                    String location = node.getTextContent();
                    node.setTextContent(adaptLocation(location, locationBase));
                }
            }
View Full Code Here

Examples of org.w3c.dom.NodeList

      Document qbXML = getDocumentFromString(xml);

      String idXML = getQBXMLName(qbXML);
      String nameQBXML = idXML.substring(0, idXML.length() - 5);

      NodeList list = qbXML.getElementsByTagName(nameQBXML + "AddRs");
      Node tmp = null;

      int requestID = 0;
      int length = list.getLength();

      for (int i = 0; i < length; i++)
      {

        tmp = list.item(i);
        requestID = Integer.parseInt(tmp.getAttributes().getNamedItem(ATTR_REQUEST_ID).getNodeValue());

        if (!tmp.getAttributes().getNamedItem(ATTR_STATUS_CODE).getNodeValue().equals("0"))
        {
          System.out.print("******RequestID = " + requestID);
View Full Code Here

Examples of org.w3c.dom.NodeList

  {
    HashMap hm = new HashMap();

    try
    {
      NodeList list = getDocumentFromString(qbxml).getElementsByTagName(qbxmlName.substring(0, qbxmlName.length() - 7) + "Ret");
      Node node = null;

      String externalID;
      String editSequence;

      int length = list.getLength();

      for (int i = 0; i < length; i++)
      {
        node = list.item(i);
        externalID = getValueOfNodeByTagName(node, TAG_LISTID);
        editSequence = getValueOfNodeByTagName(node, "EditSequence");
        hm.put(externalID, editSequence);
      }
    } catch (Exception e)
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.