SV: Parse Problem

SV: Parse Problem

am 09.05.2006 15:13:18 von Henrik Hornemann

Isn't it simply a question of having a variable $category that would be =
updateted each time you have a line starting with

Regards Henrik Hornemann
The Royal Library
Copenhagen Universitylibrary
Facultyla=EDbrary for Science and Medicine


-----Oprindelig meddelelse-----
Fra: Andy Rolls-Drew [mailto:andy_rd@hotmail.com]=20
Sendt: 9. maj 2006 11:04
Til: php-db@lists.php.net
Emne: [PHP-DB] Parse Problem
Prioritet: H=F8j

All,

=20

I am fairly new to parsing XML using PHP and wonder if anyone has a =
solution
to the following. I have a file eg:-

=20

<









































=20

And so on. I have managed to parse a little of it using Magic Parser but =
I
still cant manage to split the products and categories correctly. If =
there
weren't multiple products for each category I think I would have it.

=20

Any help would be a start.

=20

Thanks in advance

=20

Andy=20

=20

=20





ARD Drive Consultants

Drive to Perfection

=20



Rolls-Drew, Andrew
Director=20

ARD Drive Consultants Ltd
169 Nottingham Road
Melton Mowbray
Leicestershire
UK=20


andyrd@ard-drive.co.uk
AIM: DarkoneARDDrive=20


tel:=20
fax:=20
mobile:=20
Skype ID:

+44 7092 162782
+44 7092 162782
+447929418215
andyrd=20

=20



=
87> Add
me to your address book...

Want a signature like this?

=20

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: SV: Parse Problem

am 09.05.2006 17:33:27 von Constantin Wolber

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 >
><
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php