Thanks a lot Simon , it worked , can we double this filter method like category="601" and brand="15" at the same time
On Jun 8, 4:32 pm, "Simon Macneall" <macne...@gmail.com> wrote: > try doc.find('//Root/s...@category="601"]') > > On Mon, 08 Jun 2009 21:09:06 +0800, lecielbleu <canal...@gmail.com> wrote: > > > Hi , > > i have xml document like this > > <?xml version="1.0" encoding="ISO-8859-9"?> > > <Root><Stk Category="601" Group="60101" > > Brand="001">.................... > > > then i have to use Category attribute but reader class couldnt > > recognize attributes > > > when i use these codes below for testing; > > > while reader.read > > > puts reader.node_type > > end > > > it shows only 1 and 15 values which means > > XML_READER_TYPE_ELEMENT => 1 > > XML_READER_TYPE_END_ELEMENT => 15 > > > how can i get attribute values? > > > i tried another method > > doc = reader.expand > > doc.find('//Root/Stk/[Category='601']') > > but it also didnt work --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---