Package org.xmlpull.v1

Examples of org.xmlpull.v1.XmlSerializer.startDocument()


    }

    protected void writeManifest(OutputStream out) throws IOException {
        XmlSerializer xml = XMLUtils.getXmlSerializer(true);
        xml.setOutput(out, "UTF-8");
        xml.startDocument("UTF-8", null);

        xml.startTag(null, "pdashReportArchive");
        xml.attribute(null, "version", "1.0");

        for (Map.Entry<String, String> e : contentTypeMap.entrySet()) {
View Full Code Here


    public void runReport(ResourceCollection c, List<String> resources,
            OutputStream out) throws IOException {
        XmlSerializer ser = XMLUtils.getXmlSerializer(true);

        ser.setOutput(out, ENCODING);
        ser.startDocument(ENCODING, null);
        ser.startTag(null, DOCUMENT_TAG);

        for (String resourceName : resources) {
            long lastMod = c.getLastModified(resourceName);
            if (lastMod < 1)
View Full Code Here

            }
        }

        XmlSerializer xml = XMLUtils.getXmlSerializer(whitespace);
        xml.setOutput(outStream, ENCODING);
        xml.startDocument(ENCODING, null);

        xml.startTag(null, RESULT_SET_TAG);

        for (int row = 1; row <= resultSet.numRows(); row++) {
            xml.startTag(null, RESULT_ITEM_TAG);
View Full Code Here

        } catch (XmlPullParserException xppe) {
            throw new RuntimeException("Couldn't obtain xml serializer", xppe);
        }

        xml.setOutput(zipOut, ENCODING);
        xml.startDocument(ENCODING, Boolean.TRUE);
        xml.ignorableWhitespace(NEWLINE + NEWLINE);

        xml.startTag(null, ARCHIVE_ELEM);
        xml.attribute(null, TYPE_ATTR, FILE_TYPE_ARCHIVE);
        xml.ignorableWhitespace(NEWLINE);
View Full Code Here

        } catch (XmlPullParserException xppe) {
            throw new RuntimeException("Couldn't obtain xml serializer", xppe);
        }

        ser.setOutput(out);
        ser.startDocument(ENCODING, null);
        ser.ignorableWhitespace(NEWLINE);
        ser.startTag(null, DOC_ROOT_ELEM);
        ser.ignorableWhitespace(NEWLINE);

        try {
View Full Code Here

    public static void writeXmlData(OutputStream out, DataContext profileData,
            List<String> projectPaths, ResultSet data) throws IOException {
        XmlSerializer xml = XMLUtils.getXmlSerializer(true);
        xml.setOutput(out, ENCODING);
        xml.startDocument(ENCODING, null);

        xml.startTag(null, "dataroot");
        xml.attribute(null, "xmlns:od", OD_NAMESPACE_ATTR);
        xml.attribute(null, "generated", DATE_FMT.format(new Date()));
View Full Code Here

    }
   
    public void write(OutputStream out) throws IOException {
        XmlSerializer ser = XMLUtils.getXmlSerializer(true);
        ser.setOutput(out, ENCODING);
        ser.startDocument(ENCODING, null);
        ser.startTag(null, DOC_ROOT_ELEM);

        Collections.sort(mappingEntries);
        for (MappingEntry e : mappingEntries)
            e.write(ser);
View Full Code Here

          RobustFileOutputStream out = new RobustFileOutputStream(
                    defectLogFilename);
          if (defects != null && defects.length > 0) {
              XmlSerializer ser = XMLUtils.getXmlSerializer(true);
              ser.setOutput(out, XmlConstants.ENCODING);
              ser.startDocument(XmlConstants.ENCODING, null);
              ser.startTag(null, "defectLog");
              for (int i = 0; i < defects.length; i++)
                  if (defects[i] != null)
                      defects[i].toXml(ser);
              ser.endTag(null, "defectLog");
View Full Code Here

        } catch (XmlPullParserException xppe) {
            throw new RuntimeException("Couldn't obtain xml serializer", xppe);
        }

        ser.setOutput(out, ENCODING);
        ser.startDocument(ENCODING, null);
        ser.ignorableWhitespace(NEWLINE);
        ser.startTag(null, DOC_ROOT_ELEM);
        ser.ignorableWhitespace(NEWLINE + NEWLINE);

        writePageMetadata(page, ser);
View Full Code Here

        } catch (Exception e) {
        }

        StringWriter out = new StringWriter();
        ser.setOutput(out);
        ser.startDocument("utf-16", Boolean.TRUE);
        ser.flush();
        out.getBuffer().setLength(0);

        ser.startTag(null, TOP_TAG);
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.