> How?

    whatever.getElementsByTagName("tagid");

where "whatever" is not the entire document but an intermediate node
of the document tree.

Conceptually, it might look like:

    document.getElementsByTagName("tag0").getElementsByTagName("tag1")

but it would be implemented in a recursive function.

> getElementsByTagName has no only immediate children clause..
> starting at the outer most node in the tree the first pass checks not
> just the children
> but the childrens children and there children and there children etc...
> even when the base children
> dont match.. it still has to go all the way to the final nodes... for
> its matching..
>
> tracking the childnodes and matching with a switch does not involve
> regular expression based testing see
> the switch below...
>
>     for (var ln = 0; ln < node.childNodes.length; ln++) {
>         var nextn = node.childNodes.item(ln);
>         var nn = nextn.nodeName;
>         var nv = nextn.nodeValue;
>         switch (nn) {
>                 }
>
> > It can be done in a single
> > pass.
>
> If you have no inclination of preserving the structure in the XML
> and only have one tagName to search on. it is indeed one pass...
>
> In KML with folders in documents and  folders within those etc...
> . for example... asked to grab all the folders.. has to look through
> the entire tree... and will do so even if when there is nothing
> you are looking for down that branch tree...

I think Lara is looking for something very basic - Lat/Lon coordinates
for various EPA projects in order to position the infowindow with site
specific content.  Unless she expects frequent changes, a simple JS
array of objects does the trick.  GDownloadUrl & XML documents are
overkill.

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