Mioplanet Documentation Center
Resources and Help
HomeProductsMioScriptJavaScriptTechNotesPHP
   Home | JavaScript | xmlFeed.js SEARCH    

xmlFeed.js

  Functions
xmlfeed_load
xmlfeed_readMarks_clear
xmlfeed_readMarks_isRead
xmlfeed_readMarks_isUnread
xmlfeed_readMarks_load
xmlfeed_readMarks_save
xmlfeed_readMarks_setAsRead
xmlfeed_readMarks_setAsUnread

  Variables
MAX_NEWS_PER_FEED
MAX_READMARKS

  Libraries
alertEngineEx.js
channels.js
gui.k
mioEngine.js
optionsMenu.js
popupAlert.kLIB
popupAlertEx.js
scrollingTicker.js
stats.js
window_resizable.k
xmlFeed.js
xmlSettings.js

  TechNotes
Adding a Login feature
Get the real size of a web page
How to create a Business Card
How to create a Desktop Alert
How to create a Desktop Ticker
How to create a Scrolling Alert Software
How to create a Scrolling Ticker
How to create a simple RSS Reader
How to debug
LCD Monitor Chart: Screen Resolution, Size, Pitch, Display Area
Managing read marks
Measuring Elements in JavaScript
Media center remote control
Statistics: How to track users and actions
XML Configuration File Format

Library
xmlFeed.js

Language: JavaScript
Product: MioFactory


The purpose of this library is to:

Download RSS feeds and to parse them into easy to use JavaScript arrays.

Manage read/unread marks using IDs of the news items. An ID for each item must be set in the RSS feed.

This library is used by channels.js and alertEngineEx.js.

Data Feed Array


Arrays storing data parsed from RSS feeds are 3 dimensional.
The data of each individual feed is stored as follow:

array['Type']
array['Title']
array['URL']
array['Feed_URL'] URL to the XML feed itself
array['Description']
array['Image']
array['Feed_Items']

When downloaded with channels.js, the RSS feeds are stored in feeds_data[][] as follow:

feeds_data[feed_index]['Type']
etc.

array['Feed_Items'] is an array filled with each headlines found in the RSS feed.

The data of each individual item is stored in array['Feed_Items'] as follow:

array['Feed_Items'][Index]['Title']
array['Feed_Items'][Index]['Description']
array['Feed_Items'][Index]['Date']
array['Feed_Items'][Index]['URL']
array['Feed_Items'][Index]['UID']
array['Feed_Items'][Index]['XML']
array['Feed_Items'][Index]['Feed']

The item ['UID'] is the unique identifier assigned to each news item., and ID is required if you use unread marks.
If no item ID is provided in the RSS feed, the publication date is used as unique ID.

The item ['XML'] stores the full XML code of the item. This can be used to retrieve the value of specific tags or attributes not supported by the standard type of feed.

The item ['Feed'] is a reference to the feed data array:
array['Feed_Items'][Index]['Feed'] = array

For example to retrieve the URL of the feed containing a specific news item:
array['Feed_Items'][Index]['Feed']['Feed_URL']

The type of feed, stored in array['Type'], can be one of the following values depending on the XML format:

MIOALERT
XML:1
XML/OPML
XML/ATOM
XML/RSS:1, XML/RSS:2
XML/RDF:1, XML/RDF:2


Library xmlFeed.js

Functions

xmlfeed_load  |  xmlfeed_readMarks_clear  |  xmlfeed_readMarks_isRead  |  xmlfeed_readMarks_isUnread  |  xmlfeed_readMarks_load  |  xmlfeed_readMarks_save  |  xmlfeed_readMarks_setAsRead  |  xmlfeed_readMarks_setAsUnread

Variables

MAX_NEWS_PER_FEED  |  MAX_READMARKS