|
Posted by Janwillem Borleffs on 06/08/05 11:38
John wrote:
> OK, I am currently writing a webpage in PHP that will get RSS
> file(XML file) (news feed) and parse it using PHP and display
> articles' link and description. I want everytime a user click on one
> article's link, it take the user to another page which was written by
> me (for example, "display.php?aid=43232") (I don't want user to leave
> my website) and pass the article ID to the URL string. Everything run
> fine at this point but I got duplicate filename on the URL
> ("display.php?aid=43232&display.php="). I don't know how to fix this.
>
The feed is indented, which creates so called text nodes between the
elements.
To skip these nodes on a non-Windows environment, you can apply:
xml_parser_set_option($xml_parser, XML_OPTION_SKIP_WHITE, 1);
When you are working on a Windows box, you can do something like:
case "LINK" && trim($data): {
...
}
JW
[Back to original message]
|