Package org.w3c.dom

Examples of org.w3c.dom.DOMImplementation.createDocument()


    try {
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      DocumentBuilder builder = factory.newDocumentBuilder();
      DOMImplementation domImpl = builder.getDOMImplementation();
      Document doc =
        domImpl.createDocument("http://www.w3.org/2000/svg", "svg", null);
      SVGGeneratorContext ctx = SVGGeneratorContext.createDefault(doc);
      ctx.setComment("Generated by TinyUML with Batik SVG Generator");
      ctx.setEmbeddedFontsOn(true);
      SVGGraphics2D g2d = new SVGGraphics2D(ctx, true);
      g2d.setSVGCanvasSize(editor.getTotalCanvasSize());
View Full Code Here


     */
    public Document newDocument(String name, String publicId, String systemId) {
        setupDocumentBuilder();
        // Fixme: is there a better way to achieve this?
        DOMImplementation impl = this.docBuilder.newDocument().getImplementation();
        return impl.createDocument(
            null,
            name,
            impl.createDocumentType(name, publicId, systemId)
        );
    }
View Full Code Here

      try{
    DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder= builderFactory.newDocumentBuilder();
    DOMImplementation domImpl = builder.getDOMImplementation();
    DocumentType docType =domImpl.createDocumentType("office:document","-//OpenOffice.org//DTD OfficeDocument 1.0//EN",null);
    org.w3c.dom.Document newDoc = domImpl.createDocument("http://openoffice.org/2000/office","office:document",null);
   
   
    Element rootElement=newDoc.getDocumentElement();
    rootElement.setAttribute("xmlns:office","http://openoffice.org/2000/office");
    rootElement.setAttribute("xmlns:style","http://openoffice.org/2000/style" );
View Full Code Here

            DOMImplementation domImpl = builder.getDOMImplementation();

            DocumentType docType = domImpl.createDocumentType(TAG_MANIFEST_ROOT,
                                        "-//OpenOffice.org//DTD Manifest 1.0//EN",
                                        "Manifest.dtd");
      manifestDoc = domImpl.createDocument("manifest", TAG_MANIFEST_ROOT, docType);
        } catch (ParserConfigurationException ex) {
            throw new OfficeDocumentException(ex);
        }
       
        // Add the <manifest:manifest> entry
View Full Code Here

        String title = "";

        DOMImplementation impl
            = SVGDOMImplementation.getDOMImplementation();
        Document doc = impl.createDocument(SVG_NAMESPACE, "svg", null);

        Element svgRoot = doc.getDocumentElement();
        svgRoot.setAttributeNS(null, "width", Float.toString(width));
        svgRoot.setAttributeNS(null, "height", Float.toString(height));
        svgRoot.setAttributeNS(null, "viewBox",
View Full Code Here

            } catch (javax.xml.parsers.ParserConfigurationException e) {
                throw new WSDLException("Parser configuration exception: ",e.getMessage(),e);
            }

            DOMImplementation dImpl = builder.getDOMImplementation();
            Document doc = dImpl.createDocument(WSDLConstants.WSP_NAMESPACE, "Misc", null);

            UnknownExtensibilityElement exEle = new UnknownExtensibilityElement();
            exEle.setElement(doc.createElementNS("http://www.w3.org/2006/05/addressing/wsdl", "wsaw:UsingAddressing"));
            exEle.setElementType(new QName("http://www.w3.org/2006/05/addressing/wsdl", "wsaw:UsingAddressing"));
            binding.addExtensibilityElement(exEle);
View Full Code Here

                for (ApplicationConfigurationPopulator populator : instances)
                {
                    // Spec says "... For each implementation, create a fresh org.w3c.dom.Document
                    // instance, configured to be in the XML namespace of the
                    // application configuration resource format. ..."
                    Document document = domImpl.createDocument(
                        "http://java.sun.com/xml/ns/javaee", "faces-config", null);
                    //Document document = builder.newDocument();
                    populator.populateApplicationConfiguration(document);
                    documentList.add(document);
                }
View Full Code Here

            } else if (imageType.equalsIgnoreCase("svg")) {
                // Get a DOMImplementation
                DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();

                // Create an instance of org.w3c.dom.Document
                Document document = domImpl.createDocument(null, "svg", null);

                SVGGeneratorContext ctx = SVGGeneratorContext.createDefault(document);

                //ctx.setEmbeddedFontsOn(true);
                // Create an instance of the SVG Generator
View Full Code Here

            } else if (imageType.equalsIgnoreCase("svg")) {
                // Get a DOMImplementation
                DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();

                // Create an instance of org.w3c.dom.Document
                Document document = domImpl.createDocument(null, "svg", null);

                SVGGeneratorContext ctx = SVGGeneratorContext.createDefault(document);

                //ctx.setEmbeddedFontsOn(true);
                // Create an instance of the SVG Generator
View Full Code Here

    graf.setPadding(new RectangleInsets(20, 20, 20, 20));

    /* uložíme graf do souboru */
    try {
      DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();
      Document document = domImpl.createDocument(null, "svg", null);
      SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
      /* tady se určuje velikost grafu */
      graf.draw(svgGenerator, new Rectangle2D.Double(0, 0, 640, 400));
      Writer out = new OutputStreamWriter(new FileOutputStream(new File(soubor)), "UTF-8");
      /** tady musí být FALSE, jinak je to rozsypané! */
 
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.