Hi VizGuy,

Actually what I am doing totally has to do with the Google
Visualization API.

1. I am using GXml in place of XMLHttpRequest as per Google's sample
code: http://code.google.com/apis/maps/documentation/services.html
2. Don't look at it as something for the Google Maps API (although
essentially the maps portion is a gadget of the google visualization
api).
3. This is a read in of an xml file (a.k.a. reading in a file source).

I'm sure many others are doing the same sort of thing if not similar.
I would like to figure out this method without PHP.



On Nov 13, 6:25 pm, VizGuy <[EMAIL PROTECTED]> wrote:
> I am not sure what you are trying to do, but I am quite sure this is not the
> right group to post this question to, as it has nothing to do with the
> Google Visualization API. Does it...?
>
> VizGuy
>
> On Thu, Nov 13, 2008 at 10:20 PM, p00kie <[EMAIL PROTECTED]> wrote:
>
> > Attempting to parse this info:
>
> >                    if (GBrowserIsCompatible()) {
> >    503                         GDownloadUrl("../output/search/
> > results.xml", function(data) {
> >    504                             var xml = GXml.parse(data);
> >    505                             var dataId =
> > xml.documentElement.getElementsByTagName("data_id");
> >     506                             alert(dataId[0].getAttribute());
>
> > Trying to get the first element of this - on:
>
> > 1. alert(dataId[0].getAttribute()) - i get alert that says "null"
> > 2. alert(dataId[0]) - i get "[object element]"
> > 3. alert(dataId) - i get "[object nodelist]
>
> > how do i get the actual value?
>
> > once again:
>
> > this is my xml:
>
> > <?xml version="1.0" encoding="UTF-8"?><database>
> >  <select>
> >  <row>
> >   <data_id>5310482</data_id>
> >  </row
> >  </select>
> > </database>
>
> > On Nov 13, 12:42 pm, p00kie <[EMAIL PROTECTED]> wrote:
> > > Hi:
>
> > >               GDownloadUrl("../output/search/results.xml", function
> > > (data) {
> > >     503                     var xml = GXml.parse(data);
> > >     504                     var dataId =
> > > xml.documentElement.getElementsByTagName("data_id");
> > >     505                     for (var i = 0; i < dataId.length; i++) {
> > >     506                         var di = dataId[i];
> > >     507                         document.write(di);
> > >     508                 //      alert(di);
> > >     509                     }
> > >     510                   //  alert(dataId);
> > >     511                   //  print(dataId);
> > >     512                 }
>
> > > trying to parse this xml document and print out to html / alert /
> > > whatever - no success
>
> > > this is the format of the xml:
>
> > > <?xml version="1.0" encoding="UTF-8"?><database>
> > >  <select>
> > >   <row>
> > >    <data_id>5310482</data_id>
> > >   </row
> > >  </select>
> > > </database>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Visualization 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-visualization-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to