Hacker News new | ask | show | jobs
by falcolas 3327 days ago
I give you libxml:

    xmllint --xpath '//element/@attribute'
There's a good chance it's already installed on your mac.
1 comments

To avoid the hassle of handling xml namespaces (e.g. in an Atom feed...), just do:

    xmllint --xpath '//*[local-name()="element"]/@attribute'
Note: for consistency, namespaces are not needed for attribute names.

http://stackoverflow.com/questions/4402310/how-to-ignore-nam...