Examples of writeXmlDeclaration()


Examples of com.sos.JSHelper.io.Files.JSXMLFile.writeXMLDeclaration()

    @SuppressWarnings("unused")
    final String conMethodName = conClassName + "::toXMLFile";
    JSXMLFile objXF;
    try {
      objXF = new JSXMLFile(pstrXMLFileName);
      objXF.writeXMLDeclaration();
      objXF.comment(String.format("Created by %1$s", conClassName));
      objXF.Write(this.toXML());
      objXF.close();
    }
    catch (Exception e) {
View Full Code Here

Examples of de.zeigermann.xml.XMLOutputStreamWriter.writeXMLDeclaration()

      if ( filename != null ) {
        synchronized ( subscribers ) {
          try {
            FileOutputStream outputStream = new FileOutputStream(filename);
            XMLOutputStreamWriter writer = new XMLOutputStreamWriter(outputStream);
            writer.writeXMLDeclaration();
            writer.writeStartTag(XMLWriter.createStartTag(E_SUBSCRIPTIONS));
            for ( Iterator i = subscribers.iterator(); i.hasNext(); ) {
              Subscriber subscriber = (Subscriber)i.next();
              writer.writeStartTag(XMLWriter.createStartTag(E_SUBSCRIPTION, new String[][] {
                  { A_ID, String.valueOf(subscriber.getId()) } }));
View Full Code Here

Examples of de.zeigermann.xml.XMLStringWriter.writeXMLDeclaration()

  public void put(String key, Object value) throws IOException {
        if ( value instanceof StreamableValue) {
            Projector.getRepository().setResource(new URIValue(key), (StreamableValue)value, context.getCredentials());
        } else if ( value instanceof Value ) {
            XMLStringWriter writer = XMLStringWriter.create();
            writer.writeXMLDeclaration();
            ValueFactoryManager.getInstance().saveValue((Value)value, writer);
            Projector.getRepository().setResource(new URIValue(key), new StringValue(writer.toString()), context.getCredentials());
        } else {
          throw new IOException("Could not write value to repository! Given value is '"+value+"'");
        }
View Full Code Here

Examples of de.zeigermann.xml.XMLStringWriter.writeXMLDeclaration()

        return (Context)threadContext.get();
    }

     public void saveJobs() {
        XMLStringWriter writer = XMLStringWriter.create();
        writer.writeXMLDeclaration();
        writer.writeStartTag(XMLWriter.createStartTag("jobs"));
        synchronized ( jobs ) {
          for ( Iterator i = jobs.iterator(); i.hasNext(); ) {
                Job job = (Job)i.next();
                if (job.isPersistent()) {
View Full Code Here

Examples of org.apache.commons.betwixt.io.BeanWriter.writeXmlDeclaration()

    public void write( Object obj, OutputStream out ) throws Exception
    {
        BeanWriter beanWriter = new BeanWriter( out );
        beanWriter.getXMLIntrospector().setRegistry( getRegistry() );
        beanWriter.setWriteEmptyElements( true );
        beanWriter.writeXmlDeclaration( XML_DECLARATION );
        beanWriter.getBindingConfiguration().setMapIDs( false );
        try
        {
            beanWriter.write( obj.getClass().getName(), obj );
        }
View Full Code Here

Examples of org.jfree.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

Examples of org.jfree.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

Examples of org.jfree.xmlns.writer.XmlWriter.writeXmlDeclaration()

        outputRepository.createOutputStream("META-INF/manifest.xml", "text/xml");

    final OutputStreamWriter writer = new OutputStreamWriter(manifestOutputStream, "UTF-8");
    final XmlWriter xmlWriter = new XmlWriter(writer, tagDescription);
    xmlWriter.setAlwaysAddNamespace(true);
    xmlWriter.writeXmlDeclaration("UTF-8");

    final AttributeList rootAttributes = new AttributeList();
    rootAttributes.addNamespaceDeclaration("manifest", MANIFEST_NS);
    xmlWriter.writeTag(MANIFEST_NS, "manifest", rootAttributes, XmlWriterSupport.OPEN);
View Full Code Here

Examples of org.jfree.xmlns.writer.XmlWriter.writeXmlDeclaration()

    try
    {
      final OutputStreamWriter osw =
          new OutputStreamWriter(outputStream, encoding);
      final XmlWriter writer = new XmlWriter(osw);
      writer.writeXmlDeclaration(encoding);
      return new XmlPrintReportTarget(job, writer);
    }
    catch (IOException e)
    {
      throw new ReportProcessingException("Failed to create writer", e);
View Full Code Here

Examples of org.jfree.xmlns.writer.XmlWriter.writeXmlDeclaration()

        outputRepository.createOutputStream("META-INF/manifest.xml", "text/xml");

    final OutputStreamWriter writer = new OutputStreamWriter(manifestOutputStream, "UTF-8");
    final XmlWriter xmlWriter = new XmlWriter(writer, tagDescription);
    xmlWriter.setAlwaysAddNamespace(true);
    xmlWriter.writeXmlDeclaration("UTF-8");

    final AttributeList rootAttributes = new AttributeList();
    rootAttributes.addNamespaceDeclaration("manifest", MANIFEST_NS);
    xmlWriter.writeTag(MANIFEST_NS, "manifest", rootAttributes, XmlWriterSupport.OPEN);
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.