Examples of IndentingXMLStreamWriter


Examples of com.sun.xml.internal.txw2.output.IndentingXMLStreamWriter

  public void save(@NotNull Review review, @NotNull Writer writer) throws RevuException
  {
    checkXStream();

    IndentingXMLStreamWriter xmlWriter;
    try
    {
      xmlWriter = new IndentingXMLStreamWriter(XMLOutputFactory.newInstance().createXMLStreamWriter(writer));
      xmlWriter.writeStartDocument("UTF-8", "1.0");
      xmlWriter.setDefaultNamespace("http://plugins.intellij.net/revu");
      xstreamDataHolder.put(ReviewExternalizerXmlImpl.CONTEXT_KEY_REVIEW, null);
      xstream.marshal(review, new XppDriver().createWriter(writer), xstreamDataHolder);
    }
    catch (XMLStreamException e)
    {
View Full Code Here

Examples of com.sun.xml.internal.txw2.output.IndentingXMLStreamWriter

  public void save(@NotNull Review review, @NotNull Writer writer) throws RevuException
  {
    checkXStream();

    IndentingXMLStreamWriter xmlWriter;
    try
    {
      xmlWriter = new IndentingXMLStreamWriter(XMLOutputFactory.newInstance().createXMLStreamWriter(writer));
      xmlWriter.writeStartDocument("UTF-8", "1.0");
      xmlWriter.setDefaultNamespace("http://plugins.intellij.net/revu");
      xstreamDataHolder.put(ReviewExternalizerXmlImpl.CONTEXT_KEY_REVIEW, null);
      xstream.marshal(review, new XppDriver().createWriter(writer), xstreamDataHolder);
    }
    catch (XMLStreamException e)
    {
View Full Code Here

Examples of com.sun.xml.internal.txw2.output.IndentingXMLStreamWriter

            listener.message(WscompileMessages.WSIMPORT_DOCUMENT_DOWNLOAD(doc,outFile));
        }
        XMLStreamWriter xsw = writerfactory.createXMLStreamWriter(os);
        //DOMForest eats away the whitespace loosing all the indentation, so write it through
        // indenting writer for better readability of fetched documents
        IndentingXMLStreamWriter indentingWriter = new IndentingXMLStreamWriter(xsw);
        wsdlPatcher.bridge(xsr, indentingWriter);
        xsr.close();
        xsw.close();
        os.close();
        options.addGeneratedFile(outFile);
View Full Code Here

Examples of com.sun.xml.txw2.output.IndentingXMLStreamWriter

    private static final DateFormat XML_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");

    public XmlReportWriter(Writer writer) throws ReportWriterException {
        XMLOutputFactory factory = XMLOutputFactory.newInstance();
        try {
            xmlStreamWriter = new IndentingXMLStreamWriter(factory.createXMLStreamWriter(writer));
        } catch (XMLStreamException e) {
            throw new ReportWriterException("Cannot create XML stream writer.", e);
        }
    }
View Full Code Here

Examples of com.sun.xml.txw2.output.IndentingXMLStreamWriter

    private static final DateFormat XML_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");

    public XmlReportWriter(Writer writer) throws AnalysisListenerException {
        XMLOutputFactory factory = XMLOutputFactory.newInstance();
        try {
            xmlStreamWriter = new IndentingXMLStreamWriter(factory.createXMLStreamWriter(writer));
        } catch (XMLStreamException e) {
            throw new AnalysisListenerException("Cannot create XML stream writer.", e);
        }
    }
View Full Code Here

Examples of com.sun.xml.txw2.output.IndentingXMLStreamWriter

        try {
            streamWriter = xof.createXMLStreamWriter(writer);
        } catch (XMLStreamException e) {
            e.printStackTrace();
        }
        XMLStreamWriter indentingStreamWriter = new IndentingXMLStreamWriter(new CDataXMLStreamWriter(streamWriter));
        try {
            Marshaller marshaller = jaxbContext.createMarshaller();
            marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
            marshaller.marshal(rules, indentingStreamWriter);
        } catch (JAXBException e) {
View Full Code Here

Examples of com.sun.xml.txw2.output.IndentingXMLStreamWriter

  private static final DateFormat XML_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");

  public XmlReportWriter(Writer writer) throws ExecutionListenerException {
    XMLOutputFactory factory = XMLOutputFactory.newInstance();
    try {
      xmlStreamWriter = new IndentingXMLStreamWriter(factory.createXMLStreamWriter(writer));
    } catch (XMLStreamException e) {
      throw new ExecutionListenerException("Cannot create XML stream writer.", e);
    }
  }
View Full Code Here

Examples of com.sun.xml.txw2.output.IndentingXMLStreamWriter

                listener.message(WscompileMessages.WSIMPORT_DOCUMENT_DOWNLOAD(doc,outFile));
            }
            xsw = writerfactory.createXMLStreamWriter(os);
            //DOMForest eats away the whitespace loosing all the indentation, so write it through
            // indenting writer for better readability of fetched documents
            IndentingXMLStreamWriter indentingWriter = new IndentingXMLStreamWriter(xsw);
            wsdlPatcher.bridge(xsr, indentingWriter);
            options.addGeneratedFile(outFile);
        } finally {
            try {
                if (xsr != null) {xsr.close();}
View Full Code Here

Examples of javanet.staxutils.IndentingXMLStreamWriter

        try {
            XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
            outputFactory.setProperty("javax.xml.stream.isRepairingNamespaces", Boolean.FALSE);

            XMLStreamWriter xmlWriter = outputFactory.createXMLStreamWriter(writer);
            xmlWriter = new IndentingXMLStreamWriter(xmlWriter);

            xmlWriter.writeStartDocument("UTF-8", "1.0");
            xmlWriter.setPrefix("", GEXF_NAMESPACE);
            xmlWriter.writeStartElement(GEXF_NAMESPACE, GEXF);
            xmlWriter.writeNamespace("", GEXF_NAMESPACE);
View Full Code Here

Examples of javanet.staxutils.IndentingXMLStreamWriter

        context.setRootClasses(rootClasses);
        context.initialize();
        AegisWriter<XMLStreamWriter> writer = context.createXMLStreamWriter();
        FileOutputStream output = new FileOutputStream(outputPathname);
        XMLStreamWriter xmlWriter = outputFactory.createXMLStreamWriter(output);
        IndentingXMLStreamWriter indentWriter = new IndentingXMLStreamWriter(xmlWriter);

        Zoo zoo = populateZoo();
        Type aegisType = context.getTypeMapping().getType(zoo.getClass());
        writer.write(zoo, new QName("urn:aegis:demo", "zoo"), false, indentWriter, aegisType);
        xmlWriter.close();
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.