CmdID

CmdID / Commands

xmllint

XML parser and linter that supports XPath, a syntax for navigating XML trees. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Return all nodes (tags) with a specific name

xmllint --xpath "//node_name" source_file.xmlIdentify

Return the contents of the first node with a specific name as a string

xmllint --xpath "string(//node_name)" source_file.xmlIdentify

Return the href attribute of the second anchor element in an HTML file

xmllint --html --xpath "string(//a[2]/@href)" webpage.xhtmlIdentify

Return human-readable (indented) XML from file

xmllint --format source_file.xmlIdentify

Check that an XML file meets the requirements of its DOCTYPE declaration

xmllint --valid source_file.xmlIdentify

Validate XML against DTD schema hosted online

xmllint --dtdvalid url source_file.xmlIdentify