XMLStarlet-1.6.1

Introduction to XMLStarlet

XMLStarlet is a CLI utility to transform, query, validate, and edit XML documents.

XMLStarlet Dependencies

Required

libxml2 and libxslt

Installation of XMLStarlet

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

Command Explanations

--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.

Contents

Installed Programs: xml and xmlstarlet (link to xml)
Installed Libraries: None
Installed Directories: /usr/share/doc/xmlstarlet-1.6.1

Short Descriptions

xml

transforms, queries, validates, and edits XML documents