Hands-on task
This task is step 20 of the course “JSON, YAML and XML in the terminal”
Extract a value with XPath
/root/config.xml has a <host> node inside <config>. Get its text value (without tags) and write it to /root/host.txt.
Reference:xmllint
What you'll practise:
- xmllint
- XPath
- --xpath
- string()
- extraction