[GRLUG] trouble extracting from XML (Ajax)

Dave Brondsema dave at brondsema.net
Fri Feb 4 08:30:05 EST 2011


Oops - sorry for the double suggestion.

Eric, do you have a problem with joining a Google Group?  You don't need
gmail - you can have a Google Account with any email address.  Moreover,
I think you can just send an email to
grwebdev+subscribe at googlegroups.com and not even need to set up a Google
Account at all.

On 02/04/2011 08:12 AM, Eric Beversluis wrote:
> Thanks, Ben. That would be a good idea if I were willing to join Google
> Groups.
> On Fri, 2011-02-04 at 07:42 -0500, Ben Rousch wrote:
>> <shameless_plug>
>> I'm not suggesting that this is the wrong place to post, but you might
>> find more help on the Grand Rapids Web Development group.
>> http://groups.google.com/group/grwebdev
>>
>> Also feel free to join the group at our Meetup.com site
>> http://www.meetup.com/grwebdev/
>> </shameless_plug>
>>
>> On Fri, Feb 4, 2011 at 7:34 AM, Eric Beversluis
>> <ebever at researchintegration.org> wrote:
>>> Hi. Is there anyone out there who can make sense of JavaScript?
>>>
>>> I'm trying to do some AJAX and having trouble getting some of the fields
>>> out of the responseXML.
>>>
>>> Is there some Javascript gotcha that I don't know about that explains
>>> why the first line below works fine, but I keep getting nothing from my
>>> XML with the second line?
>>>
>>>
>>>   repParty[i] = Reps[i].getAttribute("party");
>>>   repCongrID[i] = Reps[i].getAttribute("govtrack_id");
>>>
>>> I don't seem to be able to retrieve data from any of the tagnames that
>>> have underscores. I've also tried with 'fec_id' and 'in_office'. I tried
>>> escaping the underscore, replacing it with a space, eliminating it all
>>> together...
>>>
>>> Thanks.
>>>
>>> Eric
>>>
>>> Here's a bit of the xml as it came to my phpproxy:
>>> <pre>
>>> -
>>> <response>
>>> -
>>> <legislators>
>>> -
>>> <legislator>
>>> <website>http://fudge.house.gov/</website>
>>> <fax>202-225-1339</fax>
>>> <govtrack_id>412327</govtrack_id>
>>> <firstname>Marcia</firstname>
>>> <chamber>house</chamber>
>>> <middlename>L.</middlename>
>>> <lastname>Fudge</lastname>
>>> <congress_office>1513 Longworth House Office Building</congress_office>
>>> <eventful_id/>
>>> <phone>202-225-7032</phone>
>>> <webform>https://forms.house.gov/fudge/contact-form.shtml</webform>
>>> <youtube_url>http://www.youtube.com/marcialfudge</youtube_url>
>>> <nickname/>
>>> <gender>F</gender>
>>> <district>11</district>
>>> <title>Rep</title>
>>> <congresspedia_url>http://www.opencongress.org/wiki/Marcia_Fudge</congresspedia_url>
>>> <in_office>True</in_office>
>>> <senate_class/>
>>> <name_suffix/>
>>> <twitter_id>marciafudge</twitter_id>
>>> <birthdate>1952-10-29</birthdate>
>>> <bioguide_id>F000455</bioguide_id>
>>> <fec_id>H8OH11141</fec_id>
>>> <state>OH</state>
>>> <crp_id>N00030490</crp_id>
>>> <official_rss/>
>>> <facebook_id>RepMarciaLFudge</facebook_id>
>>> <party>D</party>
>>> <email/>
>>> <votesmart_id>110640</votesmart_id>
>>> </legislator>
>>> -
>>> <legislator>
>>> <website>http://
>>>
>>>
>>>
>>> --
>>> This message has been scanned for viruses and
>>> dangerous content by MailScanner, and is
>>> believed to be clean.
>>>
>>> _______________________________________________
>>> grlug mailing list
>>> grlug at grlug.org
>>> http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
>>
>>
>>
>> -- 
>>   Ben Rousch
>>   brousch at gmail.com
>>   http://ishmilok.blogspot.com/
>>
> 
> 
> 


-- 
Dave Brondsema : dave at brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
               <><

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: OpenPGP digital signature
URL: <http://shinobu.grlug.org/pipermail/grlug/attachments/20110204/e4dd3181/attachment-0001.pgp>


More information about the grlug mailing list