Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Question about Rebol and XML

 [1/4] from: parki::whatevernot::com at: 6-Sep-2003 15:47


Rebol question - I want to parse up some XML (specifically an RSS file) and do some manipulations. When I try (for example): x: parse-xml read http://boingboing.net/rss.xml the result doesn't seem to contain the entirety of the source rss.xml file. Is this the right way to do things? I looked around and saw reference to xml-parse, but was unable to find any source. Would like to be able to rip up RSS and build web content from it. Thanks, parki...

 [2/4] from: carl::cybercraft::co::nz at: 24-Dec-2003 22:35


On 07-Sep-03, Brian Parkinson wrote:
> Rebol question - I want to parse up some XML (specifically an RSS > file) and do some manipulations. > When I try (for example): > x: parse-xml read http://boingboing.net/rss.xml > the result doesn't seem to contain the entirety of the source > rss.xml file.
When I tried to use parse-xml on RSS feeds I found it tripped up on the CDATA stuff, which is designed to allow the inclusion of HTML in an XML file (I think.) So that's one issue parse-xml has - there may be others. As your example feed has CDATA in, that'll be one reason stuff will be left out, anyway.
> Is this the right way to do things?
Well, it should be, but... :)
> I looked around and saw reference to xml-parse, but was unable to > find any source. > Would like to be able to rip up RSS and build web content from it.
Someone may have already written a decent, general-purpose parse rule for RSS feeds, but failing that showing up, writing a simple one that just grabs the tags you want from within each item tag would be a way to get started, not to mention a way to learn parse if it's new to you. REBOL and RSS feeds should be a perfect match and I'm surprised they haven't generated more discussion here. -- Carl Read

 [3/4] from: brett:codeconscious at: 7-Sep-2003 9:00


> I looked around and saw reference to xml-parse, but was unable to find > any source.
Gavin McKenzie wrote xml-parse. It does handle CData sections. He was on this list on 8-aug-03 so he may well pipe up here. He was going to upload xml-parse to www.rebol.org but for whatever reason it does not seem to be there. Try http://www.archive.org and enter http://www3.sympatico.ca/gavin.mckenzie/ in the wayback machine field. Regards, Brett.

 [4/4] from: maarten:vrijheid at: 7-Sep-2003 8:00


> REBOL and RSS feeds should be a perfect match and I'm surprised they > haven't generated more discussion here. >
They are, but generating them using 'build-tag or 'build-markup is even better. I did that (grabbing news from a HTML page and translating to RSS) in a 10 line script. --Maarten