How does one check the validity of an XML file to show where the xml error occurs?
Firefox can do it, but I'd like to do it in linux/windows command line.
eg. I've got a large-ish (90MB) XML file from Excel, saved in XML Spreadsheet 2003 format. It contains various invalid data, so that Firefox spits out messages like this:
Line Number 790402, Column 65:
<Cell ss:StyleID="s18"><Data ss:Type="String">Here's some data I?Bnternational</Data></Cell>
Firefox is quite slow at parsing my XML(presumably because it's keeping it all in memory ready to render into a nice navigable tree). I'm not bothered about validation against an XSD, just want to know if the XML is well-formed.
There's a linux command called xmllint that is good for this. It's very fast, handles honking great files without barfing, and gives useful validation error messages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With