[Sussex] PHP and XML

Matthew Macdonald-Wallace matthew at truthisfreedom.org.uk
Wed Oct 22 12:37:09 UTC 2003


On Tue, 2003-10-21 at 20:46, Gareth Ablett wrote:
> > Afternoon... :p
> >
> > OK, hands up all those who can spot what's wrong with this source code:
> > http://www.truthisfreedom.org.uk/rss/rss.phps and tell me why it doesn't
> > produce the same output as http://www.truthisfreedom.org.uk/rss/feed.xml
> > when all I've done is take the same file, and enclosed it in echo() and
> > print() functions?
> >
> 
> you do relise that what you have created has no use for php at all you are
> only printing/echo litiral values.
> 
> for a database driven output you need a lot more.

Yeah, I realise this, as far as I'm concerned, the XML is the tricky
part, the MySQL/PHP link has already been written and used in other
parts of the site to great effect! :P

> but for the browser to work out that its a .xml file you will need to set
> the header.

I've now got the document to display as an XML doc, but I can't get my
parser to reed it, even though it will read an XML file with exactly the
same content.

hmmm... another misson...

Matt
--
+----------------------------------+
|Matthew Macdonald-Wallace         |
|The Truth Will Set you Free       |
|http://www.truthisfreedom.org.uk/ |
+----------------------------------+
BOFH Excuse #413: Cow-tippers tipped a cow onto the server.





More information about the Sussex mailing list