Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Using PHP to parse specific XML tag content? >Thread Next - Re: Using PHP to parse specific XML tag content? Re: Using PHP to parse specific XML tag content?To: NULL Date: 12/4/2008 8:58:00 AM On Dec 3, 9:32=A0am, Captain Paralytic <paul_laut...@yahoo.com> wrote: > On 3 Dec, 15:26, Mechphisto <mechphi...@gmail.com> wrote: > > > > > On Dec 2, 9:30=A0am, Martin Honnen <mahotr...@yahoo.de> wrote: > > > > Mechphisto wrote: > > > > I'm trying to write aPHPscript that will grab the info from an XML > > > > file, and parse and sort the data into their own variables. > > > > Can someone point me a direction for information? > > > > Here's what I have so far. The following script will grab ALL data = in > > > > the file and simply make each one bold and separated by a break. > > > > I want to be able to dump the contents of message1 into say $data1 = and > > > > message2 into $data2, etc. > > > > Does that make sense? > > > > Have you considered to use SimpleXml or DOM instead? Those APIs allow > > > you to work with XML at a higher level than the xml_parser API. > > > Thanks, but unfortunately, I'm on a shared server host and don't have > > control over > > what libraries can be installed intoPHP. So, I'm kind of stuck with > > whatever solution is default built-in PHP5. > > From the manual: > Installation > > The SimpleXML extension is enabled by default. Tried the SimpleXML method on the new server: Holy moly! It cut 58, yes 58, lines of code down to 6!! SimpleXML rocks! | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
