Cool, glad you found it in the docs.

Don't be put off by the other guys' requests to post a link and read the
posting guidelines. In general they are quite right, of course. In this
case, though, posting a link to a map wouldn't have helped with the
immediate problem of the XML simply not validating.

You mentioned that you still have a problem in IE. But now that your XML is
valid, IE does seem to parse it OK. Open this URL directly in IE:

http://209.62.63.202/locations/phpsqlsearch_genxml.php?lat=33.7489954&lng=-84.3879824&radius=1

I see this result in IE8:

  <?xml version="1.0" encoding="utf-8" ?>
  <!DOCTYPE markers* (View Source for full doctype...)*>
   <markers />

This indicates that the XML document did parse successfully. (Note the
comment about the doctype, and the <markers />.)

So if you're still having trouble in IE, it may not be an XML problem per se
- it may well be related to the JavaScript API.

This may be the point at which posting that map link will prove helpful...
:-)

But first a more global question: It sounds like you are generating this XML
on your server and consuming it in your JavaScript code, right? Why are you
using XML at all? JSON would be much simpler to work with in your JavaScript
code.

-Mike

On Wed, Mar 31, 2010 at 11:09 AM, Jerry Garciuh <[email protected]>wrote:

> Thank you very much Mike.  You are quite correct and I was able to
> learn that from Andrew's links.
>
> JG
>
> On Mar 31, 1:05 pm, Michael Geary <[email protected]> wrote:
> > Well of course it's not the same question Jerry asked in his first
> message.
> > He was responding to *your* comment, Andrew, where you wondered how this
> > pertains to the JavaScript Maps API, by posting the JavaScript Maps API
> code
> > where he encountered the error. Fair enough? :-)
> >
> > So Jerry... For now don't worry about a link or the posting guidelines
> > (although they are well worth reading). You've already posted the
> complete
> > XML file, and we already know that the problem is it doesn't validate; a
> > link to the XML or to a map page won't provide any more information than
> > that. (In general a link to the file is still better than pasting the
> text
> > into a message, but in this case it worked out just fine.)
> >
> > A bit of information for you: The GXml.parse() function is nothing more
> than
> > a very thin wrapper around the native browser XML parsers. So as Andrew
> > mentioned, and as you already had figured out, it isn't a Maps API issue
> at
> > all; the real problem is that your XML is invalid.
> >
> > Once you get the XML to validate, it should make it through GXml.parse()
> > just fine.
> >
> > Unfortunately, asking a bunch of JavaScript experts about how to fix your
> > XML may not be the best plan! Thus Andrew's suggestion of looking for
> more
> > specific XML help.
> >
> > Since I know almost nothing about XML, let me try the "fools rush in
> where
> > angels fear to tread" approach.
> >
> > I see this line in your DOCTYPE:
> >
> > <!ELEMENT markers (marker+)>
> >
> > That "marker+" bit almost reminds me of a regular expression. So perhaps
> the
> > + means "one or more". But you want to allow zero marker elements as
> well.
> > To fix that in a regular expression, you would use * instead of +. So
> maybe
> > this would do the trick?
> >
> > <!ELEMENT markers (marker*)>
> >
> > Indeed, when I pasted your XML code with that change into the validator,
> it
> > validated OK. And it continued to validate OK when I added one or two
> marker
> > elements.
> >
> > Check the XML docs, but who knows, maybe I got lucky and guessed right?
> :-)
> >
> > -Mike
> >
> > On Wed, Mar 31, 2010 at 10:38 AM, Andrew Leach <
> >
> > [email protected]> wrote:
> > > On Mar 31, 6:29 pm, Jerry Garciuh <[email protected]> wrote:
> > > > Thank you for the reply.
> >
> > > > When supplied that XML IE throws the JavaScript error
> >
> > > > Error: 'documentElement' is null or not an object
> >
> > > > referencing these lines
> >
> > > >        var xml = GXml.parse(data);
> > > >        var markers =
> > > > xml.documentElement.getElementsByTagName('marker');
> >
> > > > I would like to know what I can do to eliminate this JavaScript
> error.
> >
> > > That's not the question you asked. Help us to help you: please supply
> > > a link as requested in the posting guidelines.
> >
> > > The error means that the xml has not parsed correctly. There could be
> > > any number of reasons for that, including an invalid DTD -- or data
> > > which does not validate against the DTD. What your DTD is actually
> > > defining, and how to specify it to validate the data you are
> > > generating, is explained in the document I linked to.
> >
> > > --
> > > 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]<google-maps-api%[email protected]>
> <google-maps-api%[email protected]<google-maps-api%[email protected]>
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-maps-api?hl=en.
>
> --
> 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]<google-maps-api%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-api?hl=en.
>
>

-- 
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.

Reply via email to