Re: problems with xml parser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Merlin wrote:
Hi there,

I am having some trouble in parsing some XML. No idea where I have that xml parser for php from, but I believe it worked ok in the past. Now I do have a file to parse with following structure:
<SEARCHRESULTS>
    <RESULTSET DATABASE>
    <RESULT POS="1">
        <TITLE>I want to grab this title</TITLE>


With my xml parser I do just get "RESULT = "

First of all do you have valid xml? If you don't have valid xml then you will have issues with it being parsed properly.

To check if it's valid, put a php header:

header("Content-Type: text/xml");

then print out your xml - or save the whole lot as an .xml file.

Once you have that, view it in a browser.

If that comes back as broken, then you need to fix that first before anything else.

--
Postgresql & php tutorials
http://www.designmagick.com/

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux