1. Your XML-file has incorrect format (<book> without </book>) 2. How do you parse: regular expression or DOM? Where is this XML-file stored: string or smth else? 3. Do you use jQuery?
2012/8/7 awesome <[email protected]> > Hi.. > > I'm an idiot, and i'm extremely stupid, not to mention an Economics > major.. meaning i've never formally studied any programming.. > > that said, could you please help me get an attribute's value form an xml > file? > > Sample XML from w3c: > > <book> > <book category="cooking"> > <title lang="en">Everyday Italian</title> > <author>Giada De Laurentiis</author> > <year>2005</year><price>30.00</price> > </book> > > What i want to do is grab the value "en" written under the *lang*attribute > for the > *title* tag.. plis, plis, plis.. i googled, cut paste a billion different > versions of javascript codes, and have been at it for 8 hours now.. i've > been using alert() for debugging and it everything upto the XML parse works! > > -- > You received this message because you are subscribed to the Google Groups > "greasemonkey-users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/greasemonkey-users/-/Lncz1bVch0QJ. > 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/greasemonkey-users?hl=en. > -- Валентин Сарычев, +79629250516 http://valentine-sarychev.moikrug.ru/ -- You received this message because you are subscribed to the Google Groups "greasemonkey-users" 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/greasemonkey-users?hl=en.
