Examples of XMLWriter


Examples of org.apache.openjpa.lib.xml.XMLWriter

                } else
                    writer = new StringWriter();

                Writer xml = writer;
                if ((flags & PRETTY) > 0)
                    xml = new XMLWriter(writer);
                trans.setResult(new StreamResult(xml));
                serialize(fileObjs, trans, flags);

                if (output != null)
                    output.put(file, ((StringWriter) writer).toString());
View Full Code Here

Examples of org.apache.qpid.info.util.XMLWriter

    /** Test constructor arg is returned via getXML() */
    public void testXMLWriter()
    {
        StringBuffer input = new StringBuffer("Test");
        xw = new XMLWriter(input);
        assertNotNull("XMLWriter could not instantiate", xw);
        assertEquals("XMLWriter.getXML() failed", input, xw.getXML());
    }
View Full Code Here

Examples of org.apache.rat.report.xml.writer.impl.base.XmlWriter

     * @throws IOException
     * @throws RatException
     */
    public static ClaimStatistic report(final IReportable container, final Writer out,
            ReportConfiguration pConfiguration) throws IOException, RatException {
        IXmlWriter writer = new XmlWriter(out);
        final ClaimStatistic statistic = new ClaimStatistic();
        RatReport report = XmlReportFactory.createStandardReport(writer, statistic, pConfiguration);
        report.startReport();
        container.run(report);
        report.endReport();
        writer.closeDocument();
        return statistic;
    }
View Full Code Here

Examples of org.apache.ws.commons.serialize.XMLWriter

    return new OpenXgXmlWriter();
  }

  public ContentHandler getXmlWriter(XmlRpcStreamConfig pConfig, OutputStream pStream)
      throws XmlRpcException {
    XMLWriter xw = newXmlWriter();
    xw.setDeclarating(true);
    String enc = pConfig.getEncoding();
    if (enc == null) {
      enc = XmlRpcStreamConfig.UTF8_ENCODING;
    }
    xw.setEncoding(enc);
    xw.setIndenting(false);
    xw.setFlushing(true);
   
    log.debug(":: getXmlWriter ::");
   
    try {
      xw.setWriter(new BufferedWriter(new OutputStreamWriter(pStream, enc)));
    } catch (UnsupportedEncodingException e) {
      throw new XmlRpcException(0, "Unsupported encoding: " + enc + e);
    }
    return xw;
  }
View Full Code Here

Examples of org.apache.ws.jaxme.XMLWriter

  }

  protected String generateConfigFile(SchemaSG pController, String pPackageName, List pContextList) throws SAXException {
    Document doc = pController.getConfigFile(pPackageName, pContextList);
    StringWriter sw = new StringWriter();
    XMLWriter xw = new XMLWriterImpl();
    try {
      xw.setWriter(sw);
    } catch (JAXBException e) {
      throw new SAXException(e);
    }
    DOMSerializer ds = new DOMSerializer();
    ds.serialize(doc, xw);
View Full Code Here

Examples of org.auraframework.impl.root.parser.XMLWriter

        }
    }

    private static void loadMetadataForSystemComponents(
            Map<String, Map<String, Map<String, Map<String, String>>>> components) {
        XMLWriter xmlWriter = new XMLWriter();
        Collection<XMLHandler<?>> specialComps = xmlWriter.getHandlers().values();
        Map<String, Map<String, Map<String, String>>> component;
        Map<String, Map<String, String>> componentDetails;
        for (XMLHandler<?> specialComp : specialComps) {
            String compName = specialComp.getHandledTag();
            // some handlers don't really have a TAG..
View Full Code Here

Examples of org.bifrost.xmlio.XmlWriter

    types.setDate(cal.getTime());
   
    Diff myDiff = null;
    try
    {
      XmlWriter xmlWriter = new XmlWriter(output);
      assertNotNull(xmlWriter);
      xmlWriter.setRootObject(types);
      myDiff = new Diff(TYPES_TEST, output.toString());
      assertNotNull(myDiff);
    }
    catch (XmlException e)
    {
View Full Code Here

Examples of org.ccil.cowan.tagsoup.XMLWriter

        }
        return parsingSchema;
    }

    protected ContentHandler createContentHandler(Writer w) {
        XMLWriter xmlWriter = new XMLWriter(w);

        // we might need to expose more than these two but that is pretty good
        // for a default well formed Html generator
        if (getMethod() != null) {
            xmlWriter.setOutputProperty(XMLWriter.METHOD, getMethod());
        } else {
            xmlWriter.setOutputProperty(XMLWriter.METHOD, XML);
        }

        if (isOmitXmlDeclaration) {
            xmlWriter.setOutputProperty(XMLWriter.OMIT_XML_DECLARATION, YES);
        } else {
            xmlWriter.setOutputProperty(XMLWriter.OMIT_XML_DECLARATION, NO);
        }
        return xmlWriter;

    }
View Full Code Here

Examples of org.codehaus.plexus.util.xml.XMLWriter

    public void write()
        throws Exception
    {
        final File projectFile = this.getFile(".project");
        final FileWriter fileWriter = new FileWriter(projectFile);
        final XMLWriter writer = new PrettyPrintXMLWriter(fileWriter);
        writer.startElement("projectDescription");
        writer.startElement("name");
        writer.writeText(this.project.getArtifactId());
        writer.endElement();
        writer.startElement("comment");
        writer.endElement();
        writer.startElement("projects");
        writer.endElement();
        writer.startElement("buildSpec");
        writer.startElement("buildCommand");
        writer.startElement("name");
        writer.writeText("org.eclipse.jdt.core.javabuilder");
        writer.endElement();
        writer.startElement("arguments");
        writer.endElement();
        writer.endElement();
        writer.endElement();
        writer.startElement("natures");
        writer.startElement("nature");
        writer.writeText("org.eclipse.jdt.core.javanature");
        writer.endElement();
        writer.endElement();
        writer.endElement();
        IOUtil.close(fileWriter);
        this.logger.info("Project file written --> '" + projectFile + "'");
    }
View Full Code Here

Examples of org.coode.xml.XMLWriter

        this.tree = tree;
    }

    public void write(Writer writer) throws IOException {
        XMLWriterNamespaceManager nsm = new XMLWriterNamespaceManager("");
        XMLWriter xmlWriter = new XMLWriterImpl(writer, nsm);
        xmlWriter.writeStartElement(PLIST_ELEMENT_NAME);
        xmlWriter.writeStartElement(DICT_ELEMENT_NAME);
        xmlWriter.writeStartElement(KEY_ELEMENT_NAME);
        xmlWriter.writeTextContent(GRAPHICS_LIST);
        xmlWriter.writeEndElement();
        xmlWriter.writeStartElement(ARRAY);
        writeTreeElement(tree, xmlWriter);
        xmlWriter.writeEndElement();
        xmlWriter.writeEndElement();
        xmlWriter.writeEndElement();
    }
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.