Re: iterate through node attributes
Martin Honnen <[email protected]> Tue, 09 Mar 2010 13:22:16 +0100
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Organization | Liberty Development |
| Message-ID | <[email protected]> |
kevid wrote: > please i have this xml document below. i want to a assign it to a > variable a hash of the xml document. the hash will be in the format: > > "attribute_name"=> "attribute_value" > > I would wand to use Xpath. Any clue from anyone is welcomed You can select all attribute nodes of all element nodes with the XPath descendant::*/@* -- Martin Honnen http://msmvps.com/blogs/martin_honnen/