Skip to content
Advertisement

Extract section of xml from result of curl command on Linux

I am issuing the following command:

JavaScript

Which returns xml that looks similar to this:

JavaScript

What is the easiest way to extract an xml element from the response, e.g. the element “true”?

Note, I want the complete opening tag, content, and closing tag (and the content may also be empty.

Thanks

Advertisement

Answer

Would xmllint be an option for you as well?

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement