Whitespaces in GML output of WFS request

Kralidis,Tom [Burlington] Tom.Kralidis at EC.GC.CA
Wed May 11 09:36:58 PDT 2005


This is a good point.  XML is neat because it doesn't matter how you space/tab elements, but the values inside those elements should be tight.  We have much middleware with $string =~ s/^\s+// and $string =~ /\s+$// type routines to strip leading and trailing spaces.

Cheers

..Tom

> -----Original Message-----
> From: UMN MapServer Users List
> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Jürgen Link
> Sent: Wednesday, 11 May, 2005 10:56
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] Whitespaces in GML output of
> WFS request
>
>
> The GML output of a wfs GetFeature request seems to be
> pretty-printed (look here for example:
> http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap?SERVICE=WFS&VERS
> ION=1.0.0
> &REQUEST=getfeature&TYPENAME=park).
> The element <gml:coordinates> is followed by a line feed,
> several tabs and spaces. What is quite convenient for a
> reader's eye means, that most tools (OpenEV_FW,
> deegreeViewer, Jump ...) run into error when parsing the XML document.
>
> Is there any way to switch off pretty printing (most people
> will not want to read XML)? Did anybody else work around the
> problem differently??
>
> Cheers,
> Jürgen
> --
> Dr. Jürgen Link
> BGS Systemplanung AG
> http://www.bgs-ag.de
> E-Mail juergen.link at bgs-ag.de
> Phone: 02241 166-530
> Fax:   02241 166-680
> Mobile: 0160 97262616
> 



More information about the MapServer-users mailing list