XMLStarlet is a CLI utility to transform, query, validate, and edit XML documents.
Fix building XMLStarlet against versions of libxml2 newer than 2.14.0:
sed -i 's/ATTRIBUTE_UNUSED/__attribute__((unused))/g' src/xml_pyx.c
Install XMLStarlet by running the following commands:
./configure --prefix=/usr \
--with-lib{xml,xslt}-prefix=/usr \
--docdir=/usr/share/doc/xmlstarlet-1.6.1 &&
make
Now, as the root user:
make install && ln -sfv xml /usr/bin/xmlstarlet && install -vm644 doc/xmlstarlet-ug.pdf -t /usr/share/doc/xmlstarlet-1.6.1
--with-lib{xml,xslt}-prefix=/usr:
This parameter tells XMLStarlet where libxml2 and libxslt have been
installed. This is necessary as XMLStarlet fails to find their
headers otherwise.