How To Install libxml-filter-detectws-perl on Ubuntu 18.04

In this tutorial we learn how to install libxml-filter-detectws-perl on Ubuntu 18.04. libxml-filter-detectws-perl is Perl module for detecting ignorable whitespace

Introduction

In this tutorial we learn how to install libxml-filter-detectws-perl on Ubuntu 18.04.

What is libxml-filter-detectws-perl

libxml-filter-detectws-perl is:

The XML::Filter::DetectWS module is a PerlSAX filter that detects which character data contains ignorable whitespace and optionally filters it.

The XML spec defines ignorable whitespace as the character data found in elements that were defined in an declaration with a model of ‘EMPTY’ or ‘Children’ (Children is the rule that does not contain ‘#PCDATA’).

In addition, XML::Filter::DetectWS allows the user to define other whitespace to be ignorable. The ignorable whitespace is passed to the PerlSAX Handler with the ignorable_whitespace handler, provided that the Handler implements this method. Otherwise it is passed to the characters handler. If the SkipIgnorableWS is set, the ignorable whitespace is simply discarded. XML::Filter::DetectWS also takes xml:space attributes into account.

CDATA sections are passed in the standard PerlSAX way (i.e. with surrounding start_cdata and end_cdata events), unless the Handler does not implement these methods. In that case, the CDATA section is simply passed to the characters method.

There are three methods to install libxml-filter-detectws-perl on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libxml-filter-detectws-perl Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libxml-filter-detectws-perl using apt-get by running the following command:

sudo apt-get -y install libxml-filter-detectws-perl

Install libxml-filter-detectws-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libxml-filter-detectws-perl using apt by running the following command:

sudo apt -y install libxml-filter-detectws-perl

Install libxml-filter-detectws-perl Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libxml-filter-detectws-perl using aptitude by running the following command:

sudo aptitude -y install libxml-filter-detectws-perl

How To Uninstall libxml-filter-detectws-perl on Ubuntu 18.04

To uninstall only the libxml-filter-detectws-perl package we can use the following command:

sudo apt-get remove libxml-filter-detectws-perl

Uninstall libxml-filter-detectws-perl And Its Dependencies

To uninstall libxml-filter-detectws-perl and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove libxml-filter-detectws-perl

Remove libxml-filter-detectws-perl Configurations and Data

To remove libxml-filter-detectws-perl configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libxml-filter-detectws-perl

Remove libxml-filter-detectws-perl configuration, data, and all of its dependencies

We can use the following command to remove libxml-filter-detectws-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libxml-filter-detectws-perl

References

Summary

In this tutorial we learn how to install libxml-filter-detectws-perl package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.