How To Install php-pear-XML-Parser on Fedora 36

In this tutorial we learn how to install php-pear-XML-Parser in Fedora 36. php-pear-XML-Parser is XML parsing class based on PHP’s bundled expat

Introduction

In this tutorial we learn how to install php-pear-XML-Parser on Fedora 36.

What is php-pear-XML-Parser

This is an XML parser based on PHPs built-in xml extension. It supports two basic modes of operation In “func” mode, it will look for a function named after each element (xmltag_ELEMENT for start tags and xmltag_ELEMENT_ for end tags), and in “event” mode it uses a set of generic callbacks. Since version 1.2.0 there’s a new XML_Parser_Simple class that makes parsing of most XML documents easier, by automatically providing a stack for the elements. Furthermore its now possible to split the parser from the handler object, so you do not have to extend XML_Parser anymore in order to parse a document with it.

We can use yum or dnf to install php-pear-XML-Parser on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install php-pear-XML-Parser.

Install php-pear-XML-Parser on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install php-pear-XML-Parser using dnf by running the following command:

sudo dnf -y install php-pear-XML-Parser

Install php-pear-XML-Parser on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install php-pear-XML-Parser using yum by running the following command:

sudo yum -y install php-pear-XML-Parser

How To Uninstall php-pear-XML-Parser on Fedora 36

To uninstall only the php-pear-XML-Parser package we can use the following command:

sudo dnf remove php-pear-XML-Parser

php-pear-XML-Parser Package Contents on Fedora 36

/usr/share/doc/pear/XML_Parser
/usr/share/doc/pear/XML_Parser/examples
/usr/share/doc/pear/XML_Parser/examples/xml_parser_file.php
/usr/share/doc/pear/XML_Parser/examples/xml_parser_file.xml
/usr/share/doc/pear/XML_Parser/examples/xml_parser_funcmode.php
/usr/share/doc/pear/XML_Parser/examples/xml_parser_handler.php
/usr/share/doc/pear/XML_Parser/examples/xml_parser_simple1.php
/usr/share/doc/pear/XML_Parser/examples/xml_parser_simple1.xml
/usr/share/doc/pear/XML_Parser/examples/xml_parser_simple2.php
/usr/share/doc/pear/XML_Parser/examples/xml_parser_simple2.xml
/usr/share/doc/pear/XML_Parser/examples/xml_parser_simple_handler.php
/usr/share/pear/XML/Parser
/usr/share/pear/XML/Parser.php
/usr/share/pear/XML/Parser/Simple.php
/usr/share/tests/pear/XML_Parser
/usr/share/tests/pear/XML_Parser/tests
/usr/share/tests/pear/XML_Parser/tests/001.phpt
/usr/share/tests/pear/XML_Parser/tests/002.phpt
/usr/share/tests/pear/XML_Parser/tests/003.phpt
/usr/share/tests/pear/XML_Parser/tests/004.phpt
/usr/share/tests/pear/XML_Parser/tests/004b.phpt
/usr/share/tests/pear/XML_Parser/tests/005.phpt
/usr/share/tests/pear/XML_Parser/tests/bug-9328.phpt
/usr/share/tests/pear/XML_Parser/tests/bug-9328b.phpt
/usr/share/tests/pear/XML_Parser/tests/bug-9328c.phpt
/usr/share/tests/pear/XML_Parser/tests/bug-9328d.phpt
/usr/share/tests/pear/XML_Parser/tests/test2.xml
/usr/share/tests/pear/XML_Parser/tests/test3.xml
/var/lib/pear/pkgxml/php-pear-XML-Parser.xml

References

Summary

In this tutorial we learn how to install php-pear-XML-Parser on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).