XMLStarlet

XMLStarlet is a set of command line utilities (tools) which can be used to transform, query, validate, and edit XML documents and files using simple set of shell commands in similar way it is done for plain text files using UNIX grep, sed, awk, diff, patch, join, etc commands.

http://xmlstar.sourceforge.net/overview.php

Windows: http://sourceforge.net/projects/xmlstar/files/xmlstarlet/1.6.1/xmlstarlet-1.6.1-win32.zip/download

Source code: http://sourceforge.net/p/xmlstar/code/ci/master/tree/

SlackBuild

SlackBuild: http://slackbuilds.org/repository/14.1/development/xmlstarlet/

32 bit package: xmlstarlet-1.6.1-i486-1_SBo.tgz

Examples

Sample teste.xml XML with errors

<teste>
<a></a></a>
</teste>
</teste>

Command

$ xml val -e -w teste.xml
teste.xml:2.12: Opening and ending tag mismatch: teste line 1 and a
<a></a></a>
           ^
teste.xml - invalid

XMLStarlet (last edited 2015-04-22 21:11:53 by 27)