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