Re: Parsing XML
| From: | Per Jessen | Date: | Fri, 28 Nov 2008 19:39:42 +0000 |
| Subject: | Re: Parsing XML | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-283910@lists.php.net to get a copy of this message | ||
Andrew Ballard wrote:
>> XSL will only allow me to convert it into a different document
>> format, which is not what I want as I need to keep a local copy of
>> information in a database for searching and sorting purposes. Nathans
>> class allows me to have the entire document put into an array tree,
>> which is fine for what I need so far.
>>
>>
>> Ash
>> www.ashleysheridan.co.uk
>
> A bit over the top, but you could always use XSL to turn it into CSV.
> LOL
>
> Andrew
Not over the top at all if your database understands CSV. I think it is
very odd that no-one else is advocating XSL in this case. Extracting
information from an XML file is just another way of converting it,
which is exactly what XSL is good at. I can't imagine how using a pile
of custom PHP code is going to be more efficient than writing a simple
XSL stylesheet according to recognised standards etc. Just my opinion
of course.
/Per Jessen, Zürich