How to obtain unique XML Elements
| From: | David Pratt | Date: | Sat, 23 Nov 2002 09:43:36 +0000 |
| Subject: | How to obtain unique XML Elements | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-125717@lists.php.net to get a copy of this message | ||
Anyone have a simple technique for obtaining a unique list of elements from
an XML file?
Am looking for something that will identify the first opening tag ie
<thistag> and the single tag <anothertag/> so that I get an array of tags
that I can print out. Having a bit of trouble with regex to get something
to work.
Basic idea I had is to open file, read through each line with regex, add
matches to array, and then do unique elements of array and write to another
file.
Is there a better way?
--
Regards,
Dave