How To Install nekohtml on CentOS 7

In this tutorial we learn how to install nekohtml on CentOS 7. nekohtml is HTML scanner and tag balancer

Introduction

In this tutorial we learn how to install nekohtml on CentOS 7.

What is nekohtml

NekoHTML is a simple HTML scanner and tag balancer that enables application programmers to parse HTML documents and access the information using standard XML interfaces. The parser can scan HTML files and “fix up” many common mistakes that human (and computer) authors make in writing HTML documents. NekoHTML adds missing parent elements; automatically closes elements with optional end tags; and can handle mismatched inline element tags. NekoHTML is written using the Xerces Native Interface (XNI) that is the foundation of the Xerces2 implementation. This enables you to use the NekoHTML parser with existing XNI tools without modification or rewriting code.

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

Install nekohtml on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install nekohtml using yum by running the following command:

sudo yum -y install nekohtml

Install nekohtml 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 nekohtml using dnf by running the following command:

sudo dnf -y install nekohtml

How To Uninstall nekohtml on CentOS 7

To uninstall only the nekohtml package we can use the following command:

sudo dnf remove nekohtml

References

Summary

In this tutorial we learn how to install nekohtml on CentOS 7 using yum and dnf.