2013-03-13

xmllint: Format and Validate XML on Unix

xmllint can be used in Unix to format and validate XML.

  • How do I pretty format XML?
    xmllint --output newFile.xml --format oldFile.xml

  • How do I use tabs instead of spaces to format XML?
    XMLLINT_INDENT=$'\t' xmllint --output newFile.xml --format oldFile.xml

  • How do I validate an XML against a DTD?
    xmllint --dtdvalid http://java.sun.com/j2ee/dtds/web-app_2_2.dtd web.xml

  • How do I validate against a XSD schema?
    xmllint --debugent --schema http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd web.xml 

2 comments:

  1. Heroic Thank you for making ddt4all a trusted tool for users seeking dependable functionality The software remains reliable operation is intuitive and performance is excellent It contributes significantly to improved productivity and a smoother experience for vehicle management tasks.

    ReplyDelete
  2. Jubilant Many thanks for developing this pokewilds project that continues helping players enjoy unique adventures The game remains engaging features are practical and progression feels intuitive It contributes greatly to entertainment while maintaining excellent reliability and replayability.

    ReplyDelete