Thanks for your input. If I understand you correctly, I only need to worry about the whitespace in the xml and I can ignore the Content-type problem for now. Correct?
On Dec 17, 1:41 am, Mike Williams <[email protected]> wrote: > Wasn't it Marcelo who wrote: > > >You are not sending out the correct http headers with your XML. > > >You're sending > >Content-type: text/html > > >while it should be > >Content-type: text/xml > > >There is also some whitespace before your XML output starts, which may > >or may not affect the rendering as XML. IE doesn't seem to care. > > It's actually the whitespace that's the problem. GXml.parse() doesn't > care what the MIME type is as long as the XML is valid. > > One awkward side effect of having the wrong MIME type is that the > browser attempts to parse it as HTML instead of XML when you point the > browser directly at the data. So the normal trick of validating your XML > by pointi8ng your browser at it doesn't work. If you correct the MIME > type and point FF at the data you see: > > XML Parsing Error: XML or text declaration not at start of entity > Line Number 4, Column 1: > <?xml version="1.0"?> > ^ > > As you say, MSIE doesn't seem to care. > > Chrome says: > > This page contains the following errors: > error on line 4 at column 6: XML declaration allowed only at the start > of the document > > -- > Mike Williamshttp://econym.org.uk/gmap -- You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
