Dave's Brain

Browse - Computer Tips - How can I check the syntax of an XML file?

Date: 2010may12
OS: Linux

Q.  How can I check the syntax of an XML file?

A.  Use the xmllint command.  Like this:

xmllint --noout <your-file.xml>
The "--noout" option requests no output if everything is OK. This command is in the libxml2 package in RedHat/Fedora/CentOS I learned about this command at my local LUG last night.

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.