Examples of newDocument()


Examples of es.ipsa.atril.doc.user.Dms.newDocument()

  public String incomingDeposits(AtrilSession oSes) {
    for (Document d : getDocument().children())
      if (d.type().name().equals("IncomingDeposits"))
        return d.id();
    Dms oDms = oSes.getDms();
    Document oDoc = oDms.newDocument(oDms.getDocumentType("IncomingDeposits"), getDocument());
    oDoc.save("");
    oSes.commit();
    return oDoc.id();
  }
 
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilder.newDocument()

    org.w3c.dom.Element ret=null;
   
    try {
      DocumentBuilder builder=DocumentBuilderFactory.newInstance().newDocumentBuilder();
     
      Document doc=builder.newDocument();
     
      ret = doc.createElement(TOP_LEVEL_ELEMENT_NAME);
     
    } catch(Exception e) {
      logger.error("Failed to create message", e);
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilder.newDocument()

     
      DocumentBuilder builder=fact.newDocumentBuilder();
     
      // Check if XML document, and if not return as text node
      if (text.trim().length() == 0 || text.charAt(0) != '<') {
        org.w3c.dom.Document doc=builder.newDocument();
       
        // Assume is text node
        ret = doc.createTextNode(text);
      } else {
        java.io.InputStream xmlstr=
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilder.newDocument()

     * @return ...
     */
    public static Document newDocument() {
        DocumentBuilder d = getDocumentBuilder();

        return d.newDocument();
    }

    /**
     *
     *
 
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilder.newDocument()

  }

  public void run() throws Exception {
    DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    Document tml = builder.parse(tmlFile);
    this.tld = builder.newDocument();
   
    Element taglib = createElement("taglib");
    taglib.setAttribute("xmlns", "http://java.sun.com/xml/ns/j2ee");
    taglib.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
    taglib.setAttribute("xsi:schemaLocation", "http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd");
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilder.newDocument()

          throw new RuntimeException(e);
        }
        final Map<String, Object> results = new HashMap<String, Object>();

            // process metadata
            org.w3c.dom.Document processMetadaDoc = builder.newDocument();
            org.w3c.dom.Element processMetadata = processMetadaDoc.createElement("previoustasksowner");
            processMetadaDoc.appendChild(processMetadata);
//            org.w3c.dom.Element procElement = processMetadaDoc.createElement("previoustasksowner");
            processMetadata.setAttribute("primaryname", "my_result");
//            processMetadata.appendChild(procElement);           
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilder.newDocument()

        NodeList nl = null;
        if (source instanceof org.w3c.dom.Node) {
             nl = (NodeList) exprFrom.evaluate(source, XPathConstants.NODESET);
        } else if (source instanceof String) {
            DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
            Document doc = builder.newDocument();
            //quirky: create a temporary element, use its nodelist
            Element temp = doc.createElementNS(null, "temp");
            temp.appendChild(doc.createTextNode((String) source));
            nl = temp.getChildNodes();
        } else if (source == null) {
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilder.newDocument()

                    targetElem = ((Attr) nl.item(i)).getValue();
                } else if (nl.item(i) instanceof Text) {
                    targetElem = ((Text) nl.item(i)).getWholeText();
                } else {
                    DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                    Document doc = builder.newDocument();
                    targetElem  = doc.importNode(nl.item(i), true);
                }
                target = targetElem;
            } else {
                org.w3c.dom.Node n  = ((org.w3c.dom.Node) targetElem).getOwnerDocument().importNode(nl.item(i), true);
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilder.newDocument()

                return context.getVariable(variableName.getLocalPart());
            }
        });

    DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
        return xpathEvaluator.evaluate(this.expression, builder.newDocument(), XPathConstants.BOOLEAN);
    }

    public String toString() {
        return this.expression;
    }
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilder.newDocument()

public class XmlUtils {

    public static Document newDocument() {
        try {
            DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
            return db.newDocument();
        } catch (Exception e) {
            return null;
        }
    }
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.