Re: problems with xml parser
| From: | Chris | Date: | Fri, 26 May 2006 00:59:33 +0000 |
| Subject: | Re: problems with xml parser | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-236916@lists.php.net to get a copy of this message | ||
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/