Package org.xmlpull.v1

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


        // we need to write our header manually, because we need to specify
        // XML version 1.1
        out.write(DATA_XML_HEADER + NEWLINE + NEWLINE);

        xml.setOutput(out);
        xml.startTag(null, DATA_ELEM);
        xml.ignorableWhitespace(NEWLINE);

        writeDataElementsForNode(xml, sorted, 0);

        xml.endTag(null, DATA_ELEM);
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

                    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");
              ser.endDocument();
View Full Code Here

        }

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

        writePageMetadata(page, ser);
       
        Iterator headerSnippets = page.getHeaderSnippets();
View Full Code Here

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

        ser.startTag(null, TOP_TAG);

        // filter the posted data so we are only working with items that end
        // in "_ALL".  This simplifies our work.
        if (lenientPostedDataMode)
            addMissingALLParams(postedData);
View Full Code Here

      ser.setOutput(os, "UTF-8");
      ser.setProperty(
          "http://xmlpull.org/v1/doc/properties.html#serializer-indentation",
          "\t");
      ser.startDocument("UTF-8", true);
      ser.startTag(NS, "event");
      attribute(ser, "xmlns", "http://michal.linhard.sk/openair/event");
      attribute(ser, "uri", e.getUri());
      attribute(ser, "name", e.getName());
      attribute(ser, "shortName", e.getShortName());
      attribute(ser, "version", e.getVersion());
View Full Code Here

      attribute(ser, "shortName", e.getShortName());
      attribute(ser, "version", e.getVersion());
      attribute(ser, "versionTime",
          Util.formatDateTime(e.getVersionTime()));

      ser.startTag(NS, "program");
      for (Stage eachStage : e) {
        ser.startTag(NS, "stage");
        attribute(ser, "name", eachStage.getName());
        attribute(ser, "shortName", eachStage.getShortName());
        if (eachStage.getMetadata() != null) {
View Full Code Here

      attribute(ser, "versionTime",
          Util.formatDateTime(e.getVersionTime()));

      ser.startTag(NS, "program");
      for (Stage eachStage : e) {
        ser.startTag(NS, "stage");
        attribute(ser, "name", eachStage.getName());
        attribute(ser, "shortName", eachStage.getShortName());
        if (eachStage.getMetadata() != null) {
          attribute(ser, "id", "st" + currentMetadataId);
          stageMetadata.put(currentMetadataId, eachStage);
View Full Code Here

          attribute(ser, "id", "st" + currentMetadataId);
          stageMetadata.put(currentMetadataId, eachStage);
          currentMetadataId++;
        }
        for (DayProgram eachDay : eachStage) {
          ser.startTag(NS, "day");
          attribute(ser, "date",
              Util.formatDate(eachDay.getDayStart()));
          for (Show eachShow : eachDay) {
            ser.startTag(NS, "show");
            attribute(ser, "start",
View Full Code Here

        for (DayProgram eachDay : eachStage) {
          ser.startTag(NS, "day");
          attribute(ser, "date",
              Util.formatDate(eachDay.getDayStart()));
          for (Show eachShow : eachDay) {
            ser.startTag(NS, "show");
            attribute(ser, "start",
                Util.formatDateTime(eachShow.getStart()));
            attribute(ser, "duration",
                Util.formatDuration(eachShow.getDuration()));
            attribute(ser, "name", eachShow.getName());
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.