The best way to widget would be?

goneboarding

Registered
Hi, I'm trying to make a widget that will load an XML database into a table format. I have a handle on the HTML and XML and I have both a CSS style and XSLT style to create a table (in Safari at least), but the Javascript side is doing my head in... I can manage to get an RSS feed into the widget using httpRequest but I can't seem to get a plain XML database file to load – I know RSS is XML, but I just can't get the Javascript right to return the XML elements. Can anyone give me any pointers or point me to a tute?

Is there any real difference between loading RSS and 'normal' XML?

I have looked at the Apple httpRequest page, but I just don't get it – I think because the example used is RSS, which has a simpler XML element structure. I hope my terminology is correct here, if not, sorry... I'm still learning ;)

And the bonus question – is it then even possible to get the widget to display images (small icons) named in the XML elements or by Javascript? I want as much as possible to be done client side to save bandwidth. ie icons in folder inside the widget.

Thanks for any help!
 
RSS is XML, yes. So the RSS example is extensible to different XML structures, as long as you understand how the xml_loaded function works, you should be able to start making the structure more complicated. The best approach is to start with an RSS-like structure, get the widget working, then make the structure more complicated.
 
Thanks for the tip, I'll study up on that aspect of the script, I think it should be very helpful judging from where I am with the RSS so far.
 
Another related question. Is it more suitable to use all elements, or elements with attributes to get the xml_loaded function to allocate the values more efficiently?
 
Back
Top