Package org.w3c.dom

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


      // build the config XML Element in memory using DOM
      DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
      Document doc = builder.newDocument();

      // Create config element
      Element config = doc.createElement(XMLAttributePersistenceManager.DATA_DIR_ELEMENT);
     
      // Insert a text node with the directory name
      Node text = doc.createTextNode(dir);
     
      config.appendChild(text);
View Full Code Here


       try {
         DocumentBuilder dbuild = DocumentBuilderFactory.
                            newInstance().
                            newDocumentBuilder();
         result = dbuild.newDocument();
         Element msbibCollection = result.createElement("b:Sources");
         msbibCollection.setAttribute("SelectedStyle","");
         msbibCollection.setAttribute("xmlns", "http://schemas.openxmlformats.org/officeDocument/2006/bibliography");
         msbibCollection.setAttribute("xmlns:b", "http://schemas.openxmlformats.org/officeDocument/2006/bibliography");                  
        
         for(Iterator<MSBibEntry> iter = entries.iterator(); iter.hasNext(); ) {
View Full Code Here

         return null;
     
      // TODO: move this to a separate 'marshaler'
      Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
      // <loader-repository>
      Element loaderRepository = document.createElement("loader-repository");
      loaderRepository.setAttribute("loaderRepositoryClass", config.repositoryClassName);
      loaderRepository.setTextContent(config.repositoryName.getCanonicalName());
      // <loader-repository-config>
      Element loaderRepositoryConfig = document.createElement("loader-repository-config");
      loaderRepositoryConfig.setAttribute("configParserClass", config.configParserClassName);
View Full Code Here

      // <loader-repository>
      Element loaderRepository = document.createElement("loader-repository");
      loaderRepository.setAttribute("loaderRepositoryClass", config.repositoryClassName);
      loaderRepository.setTextContent(config.repositoryName.getCanonicalName());
      // <loader-repository-config>
      Element loaderRepositoryConfig = document.createElement("loader-repository-config");
      loaderRepositoryConfig.setAttribute("configParserClass", config.configParserClassName);
      loaderRepositoryConfig.setTextContent(config.repositoryConfig);
      // Append <loader-repository-config/>
      loaderRepository.appendChild(loaderRepositoryConfig);
      //
View Full Code Here

    public Document getDOMrepresentation() {
        Document result = null;
        try {
            DocumentBuilder dbuild = DocumentBuilderFactory.newInstance().newDocumentBuilder();
            result = dbuild.newDocument();
            Element collection = result.createElement("office:document-content");
            //collection.setAttribute("xmlns", "http://openoffice.org/2000/office");
            collection.setAttribute("xmlns:office", "urn:oasis:names:tc:opendocument:xmlns:office:1.0");
            collection.setAttribute("xmlns:style", "urn:oasis:names:tc:opendocument:xmlns:style:1.0");
            collection.setAttribute("xmlns:text", "urn:oasis:names:tc:opendocument:xmlns:text:1.0");
            collection.setAttribute("xmlns:table", "urn:oasis:names:tc:opendocument:xmlns:table:1.0");
View Full Code Here

            collection.setAttribute("xmlns:table", "urn:oasis:names:tc:opendocument:xmlns:table:1.0");
            collection.setAttribute("xmlns:meta", "urn:oasis:names:tc:opendocument:xmlns:meta:1.0");
            collection.setAttribute("office:version", "1.0");
            collection.setAttribute("xmlns:fo", "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0");
            collection.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
            Element el = result.createElement("office:scripts");
            collection.appendChild(el);

            el = result.createElement("office:automatic-styles");
            Element el2 = result.createElement("style:style");
            el2.setAttribute("style:name", "ro1");
View Full Code Here

            collection.setAttribute("xmlns:fo", "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0");
            collection.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
            Element el = result.createElement("office:scripts");
            collection.appendChild(el);

            el = result.createElement("office:automatic-styles");
            Element el2 = result.createElement("style:style");
            el2.setAttribute("style:name", "ro1");
            el2.setAttribute("style:family", "table-row");
            Element el3 = result.createElement("style.table-row-properties");
            el3.setAttribute("style:row-height", "0.1681inch");
View Full Code Here

            collection.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
            Element el = result.createElement("office:scripts");
            collection.appendChild(el);

            el = result.createElement("office:automatic-styles");
            Element el2 = result.createElement("style:style");
            el2.setAttribute("style:name", "ro1");
            el2.setAttribute("style:family", "table-row");
            Element el3 = result.createElement("style.table-row-properties");
            el3.setAttribute("style:row-height", "0.1681inch");
            el3.setAttribute("fo:break-before", "auto");
View Full Code Here

            el = result.createElement("office:automatic-styles");
            Element el2 = result.createElement("style:style");
            el2.setAttribute("style:name", "ro1");
            el2.setAttribute("style:family", "table-row");
            Element el3 = result.createElement("style.table-row-properties");
            el3.setAttribute("style:row-height", "0.1681inch");
            el3.setAttribute("fo:break-before", "auto");
            el3.setAttribute("style:use-optimal-row-height", "true");
            el2.appendChild(el3);
            el.appendChild(el2);
View Full Code Here

            el3.setAttribute("style:row-height", "0.1681inch");
            el3.setAttribute("fo:break-before", "auto");
            el3.setAttribute("style:use-optimal-row-height", "true");
            el2.appendChild(el3);
            el.appendChild(el2);
            el2 = result.createElement("style:style");
            el2.setAttribute("style:name", "ta1");
            el2.setAttribute("style:family", "table");
            el2.setAttribute("style:master-page-name", "Default");
            el3 = result.createElement("style:properties");
            el3.setAttribute("table:display", "true");
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.