Forum Moderators: phranque

Message Too Old, No Replies

Working with XML Feeds

         

MrSpeed

8:48 pm on Mar 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What is the best way to handle XML feeds to display on a site in a Unix Environment? I've been in IIS/ASP world for too long and I'm not really sure of the XML capabilities in Perl and PHP. The site I'd like to use the feed for is on Unix.

1) Transform with XSLT.
2) Walk through the nodes and parse out.
2) Find/replace/ strip out tags.

Any scripts or software available to make things easier?

irock

2:58 am on Mar 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Depends... XSLT isn't very user friendly as one minor error would stall everything from displaying. For some people, XSLT is especially useful since they can share the same stylesheet and know they work on their sites. An example would be Amazon Web Services.

But if you only have a few nodes, just use PHP parser... somewhat easier.

oh I forgot... you need to install XSLT extension on your server if you want to output HTML by combining XML and XSLT stylesheet. Otherwise, the client browser must support XSLT.

andreasfriedrich

9:12 am on Mar 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




>>XML [w3.org] capabilities in Perl [perl.com] and PHP [php.net]

For PHP [php.net] see the docs for its XML parser functions [php.net] and XSLT functions [php.net].

For Perl [perl.com] have a look at XML::SAX [search.cpan.org], XML::GDOME::XSLT [search.cpan.org], XML::GDOME [search.cpan.org], XML::Simple [search.cpan.org], XML::XPath [search.cpan.org], and hundreds of other modules.

Andreas