Re: SV: [PHP-DB] Parse Problem
| From: | Constantin Wolber | Date: | Tue, 09 May 2006 15:33:27 +0000 |
| Subject: | Re: SV: [PHP-DB] Parse Problem | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-41837@lists.php.net to get a copy of this message | ||
First of all you should use a well-formed xml.
If your XML is well-formed you should check some XML Parsing Tutorial. Like this one: http://www.sitepoint.com/print/560
Eventhough it's written to parse an rss feed, you can use the same idea for parsing your files.
Constantin Wolber
Isn't it simply a question of having a variable $category that would be updateted each time you have a line starting with <CATEGORY? <<?xml version="1.0" ?> <STOREITEMS> <CREATED value="Wed Mar 15 8:07:27 GMT 2006"> <CATEGORY id='67' name='Herbal Pharmacy'> <PRODUCT ITEM='603'> <NAME></NAME> <MODEL></MODEL> <PRICE></PRICE>