XML parser and linter.

# To return all nodes named "foo":
xmllint --xpath "//foo" source_file.xml

# To return as string the contents of first node named "foo":
xmllint --xpath "string//foo" source_file.xml

# To use other xpath (a syntax for navigating xml trees) expressions for more options in navigating xml tree:
xmllint --xpath "xpath_expression" source_file.xml

# To return human-readable (indented) xml from file:
xmllint --format source_file.xml

# To check that XML meets requirements of its built-in doctype. This is the part starting with <!DOCTYPE...>:
xmllint --valid source_file.xml

# To validate XML against DTD schema hosted online:
xmllint --dtdvalid URL source_file.xml