Package org.w3c.dom

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


    newAttrib1.setValue("submission_"+number);
   
    Attr newAttrib2 = factory.createAttribute("action");
    newAttrib2.setValue(action);

    Attr newAttrib3 = factory.createAttribute("validate");
    newAttrib3.setValue("false");
   
    Attr newAttrib4 = factory.createAttribute("method");
    newAttrib4.setValue("post");
   
View Full Code Here


    newAttrib2.setValue(action);

    Attr newAttrib3 = factory.createAttribute("validate");
    newAttrib3.setValue("false");
   
    Attr newAttrib4 = factory.createAttribute("method");
    newAttrib4.setValue("post");
   
    newElement.setAttributeNode(newAttrib1);
    newElement.setAttributeNode(newAttrib2);
    newElement.setAttributeNode(newAttrib3);
View Full Code Here

   
    Document factory = node.getOwnerDocument();
    Node parent = node.getParentNode();
    Element newElement = factory.createElement("xforms:submit");
   
    Attr newAttrib1 = factory.createAttribute("id");
    newAttrib1.setValue("submit_"+number);
   
    Attr newAttrib2 = factory.createAttribute("submission");
    newAttrib2.setValue("submission_"+number);
   
View Full Code Here

    Element newElement = factory.createElement("xforms:submit");
   
    Attr newAttrib1 = factory.createAttribute("id");
    newAttrib1.setValue("submit_"+number);
   
    Attr newAttrib2 = factory.createAttribute("submission");
    newAttrib2.setValue("submission_"+number);
   
    newElement.setAttributeNode(newAttrib1);
    newElement.setAttributeNode(newAttrib2);
   
View Full Code Here

   
    parent.appendChild(newElement);
   
    Element child = factory.createElement("xforms:label");
   
    Attr newAttrib3 = factory.createAttribute("id");
    newAttrib3.setValue(submitType+"_label");
    child.setAttributeNode(newAttrib3);
    child.setTextContent(submitType);
   
    newElement.appendChild(child);
View Full Code Here

                DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
                DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
                Document doc = docBuilder.parse(filePath);
                Node rootNode = doc.getDocumentElement();
                Node secretNamespaceNode = doc.createAttribute(CipherToolConstants.SECURE_VAULT_NS_PREFIX);
                secretNamespaceNode.setTextContent(CipherToolConstants.SECURE_VAULT_NS);
                rootNode.getAttributes().setNamedItem(secretNamespaceNode);
                Node secretProviderNode = doc.createAttribute(CipherToolConstants.SECURE_VAULT_ATTRIBUTE);
                secretProviderNode.setTextContent(CipherToolConstants.SECRET_PROVIDER);
                Node secretVaultNode;
View Full Code Here

                Document doc = docBuilder.parse(filePath);
                Node rootNode = doc.getDocumentElement();
                Node secretNamespaceNode = doc.createAttribute(CipherToolConstants.SECURE_VAULT_NS_PREFIX);
                secretNamespaceNode.setTextContent(CipherToolConstants.SECURE_VAULT_NS);
                rootNode.getAttributes().setNamedItem(secretNamespaceNode);
                Node secretProviderNode = doc.createAttribute(CipherToolConstants.SECURE_VAULT_ATTRIBUTE);
                secretProviderNode.setTextContent(CipherToolConstants.SECRET_PROVIDER);
                Node secretVaultNode;
                if(capitalLetter){
                    secretVaultNode = doc.createElement(CipherToolConstants.SECURE_VAULT_CAPITAL);
                }else {
View Full Code Here

                XPathFactory xpf = XPathFactory.newInstance();
                XPath xp = xpf.newXPath();
                XPathExpression xpathEx = xp.compile(xPath);
                Node securedNode = (Node) xpathEx.evaluate(doc.getDocumentElement(), XPathConstants.NODE);
                if(securedNode != null){
                    Node secretAliasNode = doc.createAttribute(CipherToolConstants.SECURE_VAULT_ALIAS);
                    secretAliasNode.setTextContent(secretAlias);
                    securedNode.setTextContent("password");
                    securedNode.getAttributes().setNamedItem(secretAliasNode);
                } else {
                    handleException("Element for secret alias '" + secretAlias + "' can not be found in " +
View Full Code Here

    // staff elements
    Element staff = doc.createElement("Staff");
    rootElement.appendChild(staff);
    // set attribute to staff element
    Attr attr = doc.createAttribute("id");
    attr.setValue("1");
    staff.setAttributeNode(attr);
    // shorten way
    // staff.setAttribute("id", "1");
View Full Code Here

      element.appendChild(text);
    }

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

      Attr attr = document.createAttribute(this.attributeNames[i]);
      attr.setNodeValue(this.attributeValues[i]);
    }

    // insert element into XRD
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.