Home » PHP » PHP read XML file using SAX parser

PHP read XML file using SAX parser

How to php read xml file using SAX parser.SAX means Simple API for XML.The SAX parser is work differently with DOM parser, it either load any XML document into memory not create any object representation of the XML document.
The advantage of a SAX parser is that it’s really lightweight. The parser doesn’t keep anything in memory for very long, so it can be used for extremely large files. The disadvantage is that writing SAX parser callbacks is a big nuisance.

In another article I was describes how to read xml file using php simple example.

Students.xml

index.php

Demo

Download PHP Read XML file by SAX parser Example(2 KB)

That’s all.

Tags

Similar posts

  • Ramasamy

    Thank you. very useful