private String writeLine ( Line line ) { String xml = "" ; xml += "<gml:LineString><gml:posList>" ; for ( Point point : line . getPoints ( ) ) { xml += point . getX ( ) + " " + point . getY ( ) + " " ; } xml += "</gml:posList></gml:LineString>" ; return xml ; }
Takes in a line and iterates through all its points writing the posList to xml