Examples of writeXmlDeclaration()


Examples of org.pentaho.reporting.libraries.xmlns.writer.XmlWriter.writeXmlDeclaration()

    }

    final OutputStream outputStream = new BufferedOutputStream(bundle.createEntry("settings.xml", "text/xml"));
    final DefaultTagDescription tagDescription = BundleWriterHandlerRegistry.getInstance().createWriterTagDescription();
    final XmlWriter writer = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ", "\n");
    writer.writeXmlDeclaration("UTF-8");

    final AttributeList rootAttributes = new AttributeList();
    rootAttributes.addNamespaceDeclaration("", BundleNamespaces.SETTINGS);

    writer.writeTag(BundleNamespaces.SETTINGS, "settings", rootAttributes, XmlWriterSupport.OPEN);
View Full Code Here

Examples of org.pentaho.reporting.libraries.xmlns.writer.XmlWriter.writeXmlDeclaration()

    final DefaultTagDescription tagDescription = new DefaultTagDescription();
    tagDescription.setNamespaceHasCData(StaticDataFactoryModule.NAMESPACE, false);
   
    final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ",
        "\n");
    xmlWriter.writeXmlDeclaration("UTF-8");

    final AttributeList rootAttrs = new AttributeList();
    rootAttrs.addNamespaceDeclaration("data", StaticDataFactoryModule.NAMESPACE);
    xmlWriter.writeTag(StaticDataFactoryModule.NAMESPACE, "direct-static-datasource", rootAttrs, XmlWriterSupport.CLOSE);
    xmlWriter.close();
View Full Code Here

Examples of org.pentaho.reporting.libraries.xmlns.writer.XmlWriter.writeXmlDeclaration()

    tagDescription.setNamespaceHasCData(StaticDataFactoryModule.NAMESPACE, false);
    tagDescription.setElementHasCData(StaticDataFactoryModule.NAMESPACE, "query", true);

    final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ",
        "\n");
    xmlWriter.writeXmlDeclaration("UTF-8");

    final AttributeList rootAttrs = new AttributeList();
    rootAttrs.addNamespaceDeclaration("data", StaticDataFactoryModule.NAMESPACE);
    xmlWriter.writeTag(StaticDataFactoryModule.NAMESPACE, "static-datasource", rootAttrs, XmlWriterSupport.OPEN);
View Full Code Here

Examples of org.pentaho.reporting.libraries.xmlns.writer.XmlWriter.writeXmlDeclaration()

    tagDescription.setDefaultNamespace(ConnectionModule.NAMESPACE);
    tagDescription.setNamespaceHasCData(ConnectionModule.NAMESPACE, false);
    tagDescription.setElementHasCData(ConnectionModule.NAMESPACE, "attribute", true);

    final XmlWriter writer = new XmlWriter(new OutputStreamWriter(out, "UTF-8"), tagDescription);
    writer.writeXmlDeclaration("UTF-8");

    final AttributeList rootList = new AttributeList();
    rootList.addNamespaceDeclaration(null, ConnectionModule.NAMESPACE);

    writer.writeTag(ConnectionModule.NAMESPACE, "connections", rootList, XmlWriter.OPEN);
View Full Code Here

Examples of org.pentaho.reporting.libraries.xmlns.writer.XmlWriter.writeXmlDeclaration()

    final OutputStream outputStream = new BufferedOutputStream(bundle.createEntry(contentState.getFileName(),
        "text/xml"));
    final DefaultTagDescription tagDescription = BundleWriterHandlerRegistry.getInstance().createWriterTagDescription();
    final XmlWriter writer = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ", "\n");
    writer.writeXmlDeclaration("UTF-8");

    final AttributeList rootAttributes = new AttributeList();
    rootAttributes.addNamespaceDeclaration("", BundleNamespaces.DATADEFINITION);

    writer.writeTag(BundleNamespaces.DATADEFINITION, "data-definition", rootAttributes, XmlWriterSupport.OPEN);// NON-NLS
View Full Code Here

Examples of org.pentaho.reporting.libraries.xmlns.writer.XmlWriter.writeXmlDeclaration()

    final OutputStream outputStream = new BufferedOutputStream(bundle.createEntry(styleFileState.getFileName(),
        "text/xml"));
    final DefaultTagDescription tagDescription = BundleWriterHandlerRegistry.getInstance().createWriterTagDescription();
    final XmlWriter writer = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ", "\n");
    writer.writeXmlDeclaration("UTF-8");

    final AttributeList rootAttributes = new AttributeList();
    rootAttributes.addNamespaceDeclaration("", BundleNamespaces.STYLE);
    rootAttributes.addNamespaceDeclaration("layout", BundleNamespaces.LAYOUT);
    rootAttributes.addNamespaceDeclaration("core", AttributeNames.Core.NAMESPACE);
View Full Code Here

Examples of org.pentaho.reporting.libraries.xmlns.writer.XmlWriter.writeXmlDeclaration()

    final BundleWriterState layoutFileState = new BundleWriterState(state, "layout.xml");
    final OutputStream outputStream = new BufferedOutputStream(bundle.createEntry(layoutFileState.getFileName(),
        "text/xml"));
    final DefaultTagDescription tagDescription = BundleWriterHandlerRegistry.getInstance().createWriterTagDescription();
    final XmlWriter writer = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ", "\n");
    writer.writeXmlDeclaration("UTF-8");

    final ReportDefinitionWriteHandler writeHandler = new ReportDefinitionWriteHandler();
    writeHandler.writeElement(bundle, layoutFileState, writer, report);

    writer.close();
View Full Code Here

Examples of org.pentaho.reporting.libraries.xmlns.writer.XmlWriter.writeXmlDeclaration()

  public void write (final OutputStream outputStream,
                     final ElementStyleDefinition styleDefinition) throws IOException
  {
    final DefaultTagDescription tagDescription = BundleWriterHandlerRegistry.getInstance().createWriterTagDescription();
    final XmlWriter writer = new XmlWriter(new OutputStreamWriter(new NoCloseOutputStream(outputStream), "UTF-8"), tagDescription, "  ", "\n");
    writer.writeXmlDeclaration("UTF-8");

    final AttributeList rootAttributes = new AttributeList();
    rootAttributes.addNamespaceDeclaration("", BundleNamespaces.STYLE);
    rootAttributes.addNamespaceDeclaration("layout", BundleNamespaces.LAYOUT);
    rootAttributes.addNamespaceDeclaration("core", AttributeNames.Core.NAMESPACE);
View Full Code Here

Examples of org.pentaho.reporting.libraries.xmlns.writer.XmlWriter.writeXmlDeclaration()

    registry.initialize();
    itextRegistry.initialize();
    final DefaultTagDescription defaultTagDescription = new DefaultTagDescription();
    defaultTagDescription.setNamespaceHasCData(null, false);
    final XmlWriter writer = new XmlWriter(new OutputStreamWriter(new FileOutputStream("/Users/user/fonts.xml"), "UTF-8"), defaultTagDescription);
    writer.writeXmlDeclaration("UTF-8");
    writer.writeTag(null, "font-spec", "fallback-font", "Arial", false);

    final Map<String, FontRecord> records = new HashMap<String, FontRecord>();
    final String[] families = registry.getAllRegisteredFamilies();
//    final String[] families = new String[]{"Arial"};
View Full Code Here

Examples of org.pentaho.reporting.libraries.xmlns.writer.XmlWriter.writeXmlDeclaration()

            rootAttributes.addNamespaceDeclaration("ooo", OfficeNamespaces.OO2004_NS);
            rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", "1.0");
            final OutputStream outputStream = getOutputRepository().createOutputStream("settings.xml", "text/xml");
            final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), createTagDescription());
            xmlWriter.setAlwaysAddNamespace(true);
            xmlWriter.writeXmlDeclaration("UTF-8");
            xmlWriter.writeTag(OfficeNamespaces.OFFICE_NS, "document-settings", rootAttributes, XmlWriterSupport.OPEN);
            xmlWriter.writeTag(OfficeNamespaces.OFFICE_NS, "settings", XmlWriterSupport.OPEN);
            xmlWriter.writeTag(OfficeNamespaces.CONFIG, "config-item-set", NAME, "ooo:configuration-settings", XmlWriterSupport.OPEN);

            final AttributeList configAttributes = new AttributeList();
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.