Need some inputs parsing xml using SAX parser and PHP
Hi All,
I have to parse my large xml file into small chunks. I thought of going ahead with SAX parser than DOM. Does anyone having idea how to parse the xml file using SAX.
Here is the format of my xml file:
<companies>
<company>
<product>
<element ></element>
<element ></element>
</product>
<product>
<element ></element>
<element ></element>
</product>
</company>
<company>
<product>
<element ></element>
<element ></element>
</product>
<product>
<element ></element>
<element ></element>
</product>
</company>
<company>
<product>
<element></element>
<element ></element>
</product>
<product>
<element ></element>
<element ></element>
</product>
</company>
</companies>
I have to split out each company details and save them as individual XML file.
I am PHP developer. So any idea using sax parser to split each company details with the help of PHP would be appreciated.
Regards,
Krish