src/main/java/de/blau/android/osm/Changeset.java
/**
     * Generate xml for the changeset tags
     * 
     * @return an XmlSerializable for the tags
     */
Generate xml for the changeset tags

@return an XmlSerializable for the tags
Generate xml for the changeset tags @return an XmlSerializable for the tags
XmlSerializable tagsToXml() {
        return new XmlSerializable() {
            @Override
            public void toXml(XmlSerializer serializer, Long changeSetId) throws IllegalArgumentException, IllegalStateException, IOException {
                Server.startXml(serializer, generator);
                serializer.startTag("", OsmXml.CHANGESET);
                for (Entry<String, String> t : tags.entrySet()) {
                    addTag(serializer, t.getKey(), t.getValue());
                }
                serializer.endTag("", OsmXml.CHANGESET);
                Server.endXml(serializer);
            }
            /**
             * Serialize a tag
             * 
             * @param serializer the serializer
             * @param key the key
             * @param value the value
             * @throws IOException if writing to the serializer fails
             */
            private void addTag(@NonNull XmlSerializer serializer, @NonNull String key, @NonNull String value) throws IOException {
                serializer.startTag("", OsmElement.TAG);
                serializer.attribute("", OsmElement.TAG_KEY_ATTR, key);
                serializer.attribute("", OsmElement.TAG_VALUE_ATTR, value);
                serializer.endTag("", OsmElement.TAG);
            }
        };
    }
XmlSerializable tagsToXml ( ) { return new XmlSerializable ( ) { @ Override public void toXml ( XmlSerializer serializer , Long changeSetId ) throws IllegalArgumentException , IllegalStateException , IOException { Server . startXml ( serializer , generator ) ; serializer . startTag ( "" , OsmXml . CHANGESET ) ; for ( Entry < String , String > t : tags . entrySet ( ) ) { addTag ( serializer , t . getKey ( ) , t . getValue ( ) ) ; } serializer . endTag ( "" , OsmXml . CHANGESET ) ; Server . endXml ( serializer ) ; } /**
             * Serialize a tag
             * 
             * @param serializer the serializer
             * @param key the key
             * @param value the value
             * @throws IOException if writing to the serializer fails
             */ private void addTag ( @ NonNull XmlSerializer serializer , @ NonNull String key , @ NonNull String value ) throws IOException { serializer . startTag ( "" , OsmElement . TAG ) ; serializer . attribute ( "" , OsmElement . TAG_KEY_ATTR , key ) ; serializer . attribute ( "" , OsmElement . TAG_VALUE_ATTR , value ) ; serializer . endTag ( "" , OsmElement . TAG ) ; } } ; }
Generate xml for the changeset tags
Generate xml for the changeset tags