Our Recommendation for You Search your Query, You can find easily. for example search by book name or course name or any other which is related to your education

label name

PHP

PHP XML DOM

PHP XML DOM Parser


The built-in DOM parser makes it possible to process XML documents in PHP.

The XML DOM Parser

The DOM parser is a tree-based parser.
Look at the following XML document fraction:
<?xml version="1.0" encoding="UTF-8"?>
<from>Jani</from>
The DOM sees the XML above as a tree structure:
  • Level 1: XML Document
  • Level 2: Root element: <from>
  • Level 3: Text element: "Jani"

Installation

The DOM parser functions are part of the PHP core. There is no installation needed to use these functions.

The XML File

The XML file below ("note.xml") will be used in our example:
<?xml version="1.0" encoding="UTF-8"?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>