11 ms·
I give you libxml: xmllint --xpath '//element/@attribute' There's a good chance it's already installed on your mac.
by falcolas 10y ago
I give you libxml:
xmllint --xpath '//element/@attribute'
There's a good chance it's already installed on your mac.
- hyperpallium 10y agoTo 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-namespace-when-selecting-xml-nodes-with-xpath http://stackoverflow.com/questions/4402310/how-to-ignore-nam...