XML Question
Andre Garzia
andre at andregarzia.com
Fri Aug 29 05:14:05 EDT 2008
David,
Not only Kens XML Lib can handle those, but it also comes with RSS routines :-D
stsXMLLib is slower than revXML, but it can handle namespaces and
unicoded content, so I think it's a good option for parsing ATOM
Feeds.
Cheers
andre
PS: who is secretly working on some atom routines too
On Fri, Aug 29, 2008 at 6:10 AM, David Bovill <david at openpartnership.net> wrote:
> OK. I have not yet had to pay much attention to these XML DTD / name space
> issues - so help me out on this. AFAIK the name space is defined in the
> header of the XML, i this case the standard Atom header:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="
> http://purl.org/rss/1.0/modules/content/" xmlns:wfw="
> http://wellformedweb.org/CommentAPI/" xmlns:rdf="
> http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="
> http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/">
>
> So my guess is that this would work in Rev if i tell the external how to
> interpret the name spaces by pointin it to the DTD. however changeing the
> revXmlcreateTree function to be strict and not ignore badly formed XML makes
> no odds - and there does not sseem to be a way of hooking the external up to
> the external DTDs other than a simple check.
>
> 2008/8/29 Malte Brill <revolution at derbrill.de>
>
>> While this is inconvenient behaviour, it might be argued that it is
>> correct, or at least standard compliant. ;-)
>
>
> This is a standard Atom feed - the XML name spaces are defined in the
> headers with valid DTDs - or am I missing something?
>
>
>> There are XML libraries for other environments, that handle the 1st case
>> exactly the way rev does, others do not lose the namespace. As far as I can
>> tell version 2 is W3C compliant while version 1 is not. A bug in Revs
>> external? Not sure about that but eager to hear other opinions.
>
>
> I am not really able to comment on this knowledgeably. I'd be pretty
> confident it is all standards compliant - but that is relying on the source
> and my scattered reading around XML DTDs. From a user point of view - you
> want to make it as easy as possible to parse the most common XML feeds out
> here. It looks bad if it breaks with Atom feeds, and bad = bug in my
> language.
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
--
http://www.andregarzia.com All We Do Is Code.
More information about the use-livecode
mailing list