Package org.xmlpull.v1

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


        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()) {
            xml.startTag(null, "file");
            xml.attribute(null, "name", e.getKey());
            xml.attribute(null, "contentType", e.getValue());
View Full Code Here


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

        for (Map.Entry<String, String> e : contentTypeMap.entrySet()) {
            xml.startTag(null, "file");
            xml.attribute(null, "name", e.getKey());
            xml.attribute(null, "contentType", e.getValue());
            if (defaultFile.equals(e.getKey()))
                xml.attribute(null, "isDefault", "true");
            xml.endTag(null, "file");
        }
View Full Code Here

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

        for (Map.Entry<String, String> e : contentTypeMap.entrySet()) {
            xml.startTag(null, "file");
            xml.attribute(null, "name", e.getKey());
            xml.attribute(null, "contentType", e.getValue());
            if (defaultFile.equals(e.getKey()))
                xml.attribute(null, "isDefault", "true");
            xml.endTag(null, "file");
        }
View Full Code Here

        for (Map.Entry<String, String> e : contentTypeMap.entrySet()) {
            xml.startTag(null, "file");
            xml.attribute(null, "name", e.getKey());
            xml.attribute(null, "contentType", e.getValue());
            if (defaultFile.equals(e.getKey()))
                xml.attribute(null, "isDefault", "true");
            xml.endTag(null, "file");
        }

        xml.endTag(null, "pdashReportArchive");
        xml.endDocument();
View Full Code Here

            Long checksum = c.getChecksum(resourceName);
            if (checksum == null)
                continue;

            ser.startTag(null, RESOURCE_TAG);
            ser.attribute(null, NAME_ATTR, resourceName);
            ser.attribute(null, MOD_TIME_ATTR, Long.toString(lastMod));
            ser.attribute(null, CHECKSUM_ATTR, checksum.toString());
            ser.endTag(null, RESOURCE_TAG);
        }
View Full Code Here

            if (checksum == null)
                continue;

            ser.startTag(null, RESOURCE_TAG);
            ser.attribute(null, NAME_ATTR, resourceName);
            ser.attribute(null, MOD_TIME_ATTR, Long.toString(lastMod));
            ser.attribute(null, CHECKSUM_ATTR, checksum.toString());
            ser.endTag(null, RESOURCE_TAG);
        }

        ser.endTag(null, DOCUMENT_TAG);
View Full Code Here

                continue;

            ser.startTag(null, RESOURCE_TAG);
            ser.attribute(null, NAME_ATTR, resourceName);
            ser.attribute(null, MOD_TIME_ATTR, Long.toString(lastMod));
            ser.attribute(null, CHECKSUM_ATTR, checksum.toString());
            ser.endTag(null, RESOURCE_TAG);
        }

        ser.endTag(null, DOCUMENT_TAG);
        ser.endDocument();
View Full Code Here

        xml.startTag(null, RESULT_SET_TAG);

        for (int row = 1; row <= resultSet.numRows(); row++) {
            xml.startTag(null, RESULT_ITEM_TAG);
            xml.attribute(null, PATH_ATTR, resultSet.getRowName(row));

            for (int col = 1; col <= resultSet.numCols(); col++) {
                String name = resultSet.getColName(col);
                SimpleData d = resultSet.getData(row, col);
                String value = (d == null ? null : d.format());
View Full Code Here

                SimpleData d = resultSet.getData(row, col);
                String value = (d == null ? null : d.format());

                if (inlineAttributes) {
                    if (value != null)
                        xml.attribute(null, name, value);
                } else {
                    xml.startTag(null, RESULT_DATA_TAG);
                    xml.attribute(null, NAME_ATTR, name);
                    if (value != null)
                        xml.attribute(null, VALUE_ATTR, value);
View Full Code Here

                if (inlineAttributes) {
                    if (value != null)
                        xml.attribute(null, name, value);
                } else {
                    xml.startTag(null, RESULT_DATA_TAG);
                    xml.attribute(null, NAME_ATTR, name);
                    if (value != null)
                        xml.attribute(null, VALUE_ATTR, value);
                    xml.endTag(null, RESULT_DATA_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.