SWXml by Florian Plag has me really excited! SWXml is a SWX API that provides a generic XML to SWX parser that can be used over SWX RPC. You can see examples, read the documentation, and download SWXml from the see the SWXml home page.
I've also added SWXml to the Public SWX Gateway so you can start using it in your applications today. Test out SWXml now using the SWX Service Explorer.
What does SWXml mean to you? It means that you can load any XML data set from the web into Flash as native objects, without _any_ client-side parsing.
You can, for example, consume RSS feeds or XML results from REST API calls.
The SWXml API has just one method, called parseXML. The parseXML method, in turn, takes just one argument: the url of an XML data source to parse. The method loads, parses, and returns the requested XML in SWX format (i.e., as native Flash objects, wrapped in a SWF) Yummy!
Florian has entered SWXml into the SWX contest in the APIs category, so there's going to be some great competition. If you haven't started on your own entry (the categories are web, mobile, and APIs), what are you waiting for? Get cracking!
For more information, documentation, and examples, and to download the package, see the SWXml home page.
Update: Florian has now recorded a screencast showing you how to use SWXml (2 min 48 sec, without sound).
The Introducing SWXml: XML to SWX parser article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.
The best ideas are always the ones that make you ask “why hasn’t anyone thought of that before?”
Good news!
[...] I just read Aral’’s post about Florian’’s SWXml (an xml parser for SWX). I finished reading that post at 18:22 and by 18:25 I’d loaded my blog’s 10 most recent posts into flash! [...]
[...] friend Dan played around with SWXml yesterday and hacked together a simple RSS reader in three minutes: That’s incredible on the easy [...]
I recorded a basic demonstration (tutorial) that shows how to use SWXml (2 min 48 sec, without sound).
By the way, I’ve just seen Aral’s post about the Leopard dashboard and Flash:
SWX and SWXml also work perfect in the dashboard :-)
Hey Flo, thanks for the update, man! (Btw, I just edited your comment so that the links display better on the site). I’m going to update the post with a link to your screencast now.
Aral,
That’s very interesting. I have been working on SimplePie module for SWX, it would have been Feeds specific. Now I wouldn’t work on it anymore, SWXml sounds great…
-abdul
Hi Abdul,
I don’t think SWXml diminishes the need for SWX-specific APIs for things but I am going to integrate it into the BaseService class so that developers can also make new SWX APIs easily from existing XML-based ones (just like they can today with the jsonCall() method in the BaseService class with JSON endpoints.)
I updated the SWXml class (0.8.2):
I added the possibility to send a local string containing XML to SWXml, e.g. “Hello World”.
Therefore, there’s a new parameter called “xmlType”. If you set it to “string”, SWXml interprets the XML source as a local string, not as a URL (which is default). The parameter is optional, so the new version is fully backward compatible.
I also prepared SWXml for mock data support.
And last but not least: SWXml now checks if you send a valid URL that starts with ‘http’.
Sorry, the “Hello World” example code in my last comment should look like this:
<xml><demo>Hello World</demo></xml>
Inspired by miniFlickr, I just posted a miniRSS reader, using SWX and SWXml.
Watch the screencast that shows how miniRSS displays Aral’s RSS feed on Flash Lite :-)
That’s really great :-) !!
Good news! В свое время тема мне помогла
all these swxml widgets are broken for me now ….. they all stopped receiving the rss feed anyone now why?? or how to fix ?
even on the german site that launched these demos they are broken just … three dots