Hello Everybody, I have pretty basic question abut REXML. I want to put the String "John doe" in titles array, if attribute name is equal to "93". Please see the code below. I could not find how to do it.. any help would be very appriciated.
Here is the XML i am trying to parse <entrydata columnnumber="2" name="93"> <text>John doe</text> </entrydata> <entrydata columnnumber="1" name="86"> <numberlist> <number>0</number> <number>0</number> </numberlist> </entrydata> Code in controll doc.elements.each('viewentries/viewentry/entrydata') do |ele| if ele.attributes["name"] = "93" titles << // here I like to put <text> value in titles array. end end Thanks, Pawan Gupta ------------------------------------------------------------------------------------- Blog : http://www.xanga.com/pawan79 ____________________________________________________________________________________ Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
_______________________________________________ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users