Re: [PHP] How to obtain unique XML Elements
Hello, "David Pratt" <[EMAIL PROTECTED]> wrote: > 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 > and the single tag 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? Yes. Have you checked the manual? :) http://www.php.net/manual/en/ref.xml.php - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to obtain unique XML Elements
hi, you can get this parser http://creaturesx.ma.cx/kxparse/ if you want only this limited functionality (take an old version) 0.2 for example, you may also want to take only particular functions from it this is valid in all cases (as i think), except that you are developing another parser :) khalid _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to obtain unique XML Elements
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 and the single tag 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php