How To Install perl-XML-Twig on CentOS 7

In this tutorial we learn how to install perl-XML-Twig on CentOS 7. perl-XML-Twig is Perl module for processing huge XML documents in tree mode

Introduction

In this tutorial we learn how to install perl-XML-Twig on CentOS 7.

What is perl-XML-Twig

This module provides a way to process XML documents. It is build on top of XML document, while allowing you to output the parts of it that have been completely processed. It allows minimal resource (CPU and memory) usage by building the tree only for the parts of the documents that need actual processing, through the use of the twig_roots and twig_print_outside_roots options.

We can use yum or dnf to install perl-XML-Twig on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install perl-XML-Twig.

Install perl-XML-Twig on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install perl-XML-Twig using yum by running the following command:

sudo yum -y install perl-XML-Twig

Install perl-XML-Twig on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install perl-XML-Twig using dnf by running the following command:

sudo dnf -y install perl-XML-Twig

How To Uninstall perl-XML-Twig on CentOS 7

To uninstall only the perl-XML-Twig package we can use the following command:

sudo dnf remove perl-XML-Twig

References

Summary

In this tutorial we learn how to install perl-XML-Twig on CentOS 7 using yum and dnf.