Package org.w3c.dom

Examples of org.w3c.dom.Node.appendChild()


                onlineResourcesList[FMT_GETCAPS]));
        request.appendChild(requestcap(doc, WMTConstants.GETMAP, formatsList[FMT_GETMAP], "Get",
                onlineResourcesList[FMT_GETMAP]));
        request.appendChild(requestcap(doc, WMTConstants.GETFEATUREINFO, formatsList[FMT_GETFEATUREINFO],
                "Get", onlineResourcesList[FMT_GETFEATUREINFO]));
        capability.appendChild(request);

        Element exceptionElement = doc.createElement("Exception");
        for (int i = 0; i < formatsList[FMT_EXCEPTIONS].size(); i++) {
            exceptionElement.appendChild(textnode(doc, "Format", (String) formatsList[FMT_EXCEPTIONS].get(i)));
        }
View Full Code Here


        Element exceptionElement = doc.createElement("Exception");
        for (int i = 0; i < formatsList[FMT_EXCEPTIONS].size(); i++) {
            exceptionElement.appendChild(textnode(doc, "Format", (String) formatsList[FMT_EXCEPTIONS].get(i)));
        }
        capability.appendChild(exceptionElement);

        capability.appendChild(createLayersElement(doc));
        root.appendChild(capability);

        return doc;
View Full Code Here

        for (int i = 0; i < formatsList[FMT_EXCEPTIONS].size(); i++) {
            exceptionElement.appendChild(textnode(doc, "Format", (String) formatsList[FMT_EXCEPTIONS].get(i)));
        }
        capability.appendChild(exceptionElement);

        capability.appendChild(createLayersElement(doc));
        root.appendChild(capability);

        return doc;
    }
   
View Full Code Here

                        if (resp.getNodeName().contains("pingResponse")) {
                            Node child = resp.getFirstChild();
                            Document doc = resp.getOwnerDocument();
                            Node info = doc.createElementNS(child.getNamespaceURI(), child.getLocalName());
                            info.setPrefix("ns4");
                            info.appendChild(doc.createTextNode(getHandlerId()));
                            resp.appendChild(info);
                            msg.saveChanges();
                        }
                    } catch (DOMException e) {
                        e.printStackTrace();
View Full Code Here

                        // Ignore this handlers information as it will be added again later.
                        //
                        if (!info.contains(getHandlerId())) {
                            Node newEl = doc.createElementNS(namespace, "HandlersInfo");
                            newEl.setPrefix("ns4");
                            newEl.appendChild(doc.createTextNode(info));
                            wrapper.appendChild(newEl);
                        }
                    }
                    ret = false;
                } else if ("throw".equals(command)) {
View Full Code Here

    Node tmpNode = null;

    if (name != null)
    {
      tmpNode = doc.createElement("Name");
      tmpNode.appendChild(doc.createTextNode(name));
      retNode.appendChild(tmpNode);
    }
    if (address != null)
    {
      tmpNode = doc.createElement("Address");
View Full Code Here

      retNode.appendChild(tmpNode);
    }
    if (address != null)
    {
      tmpNode = doc.createElement("Address");
      tmpNode.appendChild(doc.createTextNode(address));
      retNode.appendChild(tmpNode);
    }

    return retNode;
  }
View Full Code Here

          {
            values = (String[]) parameters.get(key);
            for (int i = 0; i < values.length; i++)
            {
              tmpNode = requestDoc.createElement(key);
              tmpNode.appendChild(requestDoc
                  .createTextNode(values[i]));
              rootNode.appendChild(tmpNode);
            }
          }
        }
View Full Code Here

        if (DebugFile.trace) DebugFile.writeln("removing child "+vFormerOrderBlcks.get(c).id());
        oBlksNode.removeChild(vFormerOrderBlcks.get(c).getNode());
     }
     for (int c=0; c<nBlocks; c++) {
        if (DebugFile.trace) DebugFile.writeln("append child "+vNewPermutedBlcks.get(c).id());
        oBlksNode.appendChild(vNewPermutedBlcks.get(c).getNode());
     }

      if (DebugFile.trace) {
        DebugFile.decIdent();
        DebugFile.writeln("End Page.permute()");
View Full Code Here

      } // then (tagName.charAt(0)=='@')
      else
      { // Tag name indicates an elemnet node name.
        Node valueNode = mDoc.createTextNode(value);
        Node newNode = mDoc.createElement(tagName);
        newNode.appendChild(valueNode);
        parent.replaceChild(newNode, child);
      } // else (tagName.charAt(0)=='@')
    } // else (tagName==null || tagName.length()==0)
  } // insertValue(String tagName, String value, Document xmlNew, Node
    // parent, Node child)
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.