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?To: NULL Date: 12/4/2008 7: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. Actually, on my present Web site, phpinfo() doesn't have any entry for SimpleXML. However, on the new server we're moving to, the phpinfo() DOES have SimpleXML listed! So, I'll switch to that probably when we move servers. Thanks. :) | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
