Package org.w3c.dom

Examples of org.w3c.dom.Document.createElement()


      throws XException
  {
    Document doc = XMLHelper.getDocumentBuilder("Default", null)
        .newDocument();

    Element root = doc.createElement(XDomSupport.makeTagNameValid(system
        .getName()));
    doc.appendChild(root);

    Hashtable addresses = system.getAddresses();
    if (!addresses.isEmpty())
View Full Code Here


    doc.appendChild(root);

    Hashtable addresses = system.getAddresses();
    if (!addresses.isEmpty())
    {
      Element addressesNode = doc.createElement("Addresses");
      String address = null;
      Element addressNode = null;
      for (Enumeration keys = addresses.keys(); keys.hasMoreElements();)
      {
        address = (String) keys.nextElement();
View Full Code Here

      String address = null;
      Element addressNode = null;
      for (Enumeration keys = addresses.keys(); keys.hasMoreElements();)
      {
        address = (String) keys.nextElement();
        addressNode = doc.createElement("Address");
        addressNode.setAttribute("name", address);
        addressNode.appendChild(doc.createTextNode((String) addresses
            .get(address)));
        addressesNode.appendChild(addressNode);
      }
View Full Code Here

        addressesNode.appendChild(addressNode);
      }
      root.appendChild(addressesNode);
    }

    Element data = doc.createElement("Data");
    data.appendChild(doc.createCDATASection(message.toString()));
    root.appendChild(data);

    return XMLHelper.serializeXML(doc, null);
  }
View Full Code Here

                                                                         "schema"));

            DocumentBuilder docBuilder;
            docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
            Document doc = docBuilder.newDocument();
            Element element = doc.createElement("xsd:schema");
            Map<String, String> schemafileMap = wmodel.getSchemaNSFileMap();

            Set<Map.Entry<String, String>> entryset = schemafileMap.entrySet();
            Iterator<Map.Entry<String, String>> ite = entryset.iterator();
            while (ite.hasNext()) {
View Full Code Here

            Set<Map.Entry<String, String>> entryset = schemafileMap.entrySet();
            Iterator<Map.Entry<String, String>> ite = entryset.iterator();
            while (ite.hasNext()) {
                Map.Entry<String, String> entry = (Map.Entry<String, String>)ite.next();
                Element importelement = doc.createElement("xsd:import");
                importelement.setAttribute("namespace", entry.getKey());
                importelement.setAttribute("schemaLocation", entry.getValue());
                element.appendChild(importelement);
            }
            schema.setElement(element);
View Full Code Here

      }

      Document doc = DocumentHolder.m_doc;
      synchronized (doc)
      {
        Element element = doc.createElement("token");
        Text text = doc.createTextNode(token);
        element.appendChild(text);
        resultSet.addNode(element);     
      }
    }
View Full Code Here

      Document doc = DocumentHolder.m_doc;
      synchronized (doc)
      {
        while (lTokenizer.hasMoreTokens())
        {
          Element element = doc.createElement("token");
          element.appendChild(doc.createTextNode(lTokenizer.nextToken()));
          resultSet.addNode(element);     
        }
      }
    }
View Full Code Here

      Document doc = DocumentHolder.m_doc;
      synchronized (doc)
      {
        for (int i = 0; i < toTokenize.length(); i++)
        {
          Element element = doc.createElement("token");
          element.appendChild(doc.createTextNode(toTokenize.substring(i, i+1)));
          resultSet.addNode(element);             
        }
      }
    }
View Full Code Here

        return resultNode;

      // If reflection failed, fallback to our internal EnvironmentCheck
      EnvironmentCheck envChecker = new EnvironmentCheck();
      Hashtable h = envChecker.getEnvironmentHash();
      resultNode = factoryDocument.createElement("checkEnvironmentExtension");
      envChecker.appendEnvironmentReport(resultNode, factoryDocument, h);
      envChecker = null;
    }
    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.