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

  Functions
alertEngine_init
alertEngine_popup_hide
alertEngine_processed
array_addIfNotExists
array_indexOf
array_insertItem
array_removeItem
blink_set
call_callback
channels_feeds_get
channels_feeds_getByCategory
channels_feeds_getIndex
channels_get_allCategories
channels_get_categories
channels_get_value
channels_init
channels_latestNews_clear
channels_latestNews_countUnread
channels_latestNews_getNextUnread
channels_latestNews_getReadMark
channels_latestNews_hasUnread
channels_latestNews_setAllReadMarks
channels_latestNews_setReadMark
channels_loadFromMemory
channels_readMarks_countUnread
channels_readMarks_nextUnread
channels_readMarks_setAllAsRead
channels_set_value
comma
disableOnSelectStart
echo
error
isNumber
linksMenu_show
log
logIsEnabled
mailTo
mioxml_createObject
mioxml_download
mioxml_extract
mioxml_getElement
mioxml_getElementArray
mio_alert
mio_autoRestart
mio_autoShape_apply
mio_autoShape_end
mio_autoShape_start
mio_close
mio_createDownloadID
mio_data_get
mio_data_getBool
mio_data_load
mio_data_save
mio_data_set
mio_dialog
mio_dialog_close
mio_dialog_html
mio_execScript
mio_fadeIn
mio_fadeOut
mio_file_get
mio_file_load
mio_file_save
mio_maintenance
mio_menu
mio_openAtStartup
mio_openURL
mio_restart
mio_run
optionsMenu_show
replace
sendToMio
start_download_channels
stats_software_send
stats_trackingID_send
str_decrypt
str_encrypt
str_posEx
text_ellipsis
ticker_add
ticker_get_scrolling_text
ticker_scroll_restart
ticker_set_callback
ticker_set_text
ticker_start
ticker_staticMessage
trim
xmlfeed_load
xmlfeed_readMarks_clear
xmlfeed_readMarks_isRead
xmlfeed_readMarks_isUnread
xmlfeed_readMarks_load
xmlfeed_readMarks_save
xmlfeed_readMarks_setAsRead
xmlfeed_readMarks_setAsUnread
xml_settings_ads_get
xml_settings_appUpdate
xml_settings_download
xml_settings_getLocalVersion
xml_settings_menu_get

  Events
all_channels_refreshed
latest_news_onchange

  Variables
alertEngine_default_textColor
alerts_bag[][]
alert_history_max
alert_toPopup_max
channels_bag[][]
channel_id[]
current_alert
current_alert_id
current_channel
current_channel_id
current_software
current_software_id
default_channels[]
default_channels_count
enabled_channels[]
enabled_channels_count
feeds_data[][]
isDownloading
latest_news[]
latest_news_count
MAX_HISTORY_ITEMS
MAX_HISTORY_LENGTH
MAX_LATEST_NEWS_ITEMS
MAX_LATEST_NEWS_LENGTH
MAX_LATEST_NEWS_PER_CHANNEL
MAX_NEWS_PER_FEED
MAX_READMARKS
mioData
MIO_XML
server_http_root[]
server_stats_root[]
software_bag[][]
software_id[]
tab_accounts
TICKER_PAUSED
TICKER_SCROLL_RATES
TICKER_SCROLL_STEPS
username
xdata_alertsActive[]
xdata_alertsHistory[]
xdata_alerts[]
xdata_channels[]
xdata_software[]
XML Alerts Feeds
xml_settings_obj
xml_settings_xml

  Libraries
Admin Panel JavaScript Library
alertEngineEx.js
channels.js
mioEngine.js
miolib.js
optionsMenu.js
popupAlertEx.js
scrollingTicker.js
stats.js
xmlFeed.js
xmlSettings.js

Function
mioxml_getElementArray

Language: JavaScript
Product: MioFactory


Syntax

mioxml_getElementArray(XML, HTML_TAG, HTML_ATTR)


Parameters

STRINGXMLXML data to search in
STRINGHTML_TAGHTML tag to retrieve
STRINGHTML_ATTROptional.
HTML attribute


Return value

Array of strings



Description

Search the tags in the specified XML document and returns an array of values.

If the third parameter HTML_ATTR is set, the function returns the values of this parameter.
Otherwise, the content of the tags are returned.




JavaScript Sample Code

// In this sample, we have an XML file as follow:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<DATA>
    <ITEM>A</ITEM>
    <ITEM>B</ITEM>
    <ITEM>C</ITEM>
    <ITEM>D</ITEM>
</DATA>

// The JavaScipt code to retrieve the content of the tag VERSION
// is as follow:

mioxml_download("www.mioplanet.com/data.xml", "xml_data_loaded");

// Download completed...
function xml_data_loaded(status) {
    if(status == 1) {
        item = mioxml_getElementArray(MIO_XML.xml, "ITEM");
        alert(item[0]);
    } else {
        // Failure: can be a wrong URL or an error in the XML file
        alert("Failure");
    }
}



Library mioEngine.js

Functions

error  |  log  |  logIsEnabled  |  mioxml_createObject  |  mioxml_download  |  mioxml_extract  |  mioxml_getElement  |  mioxml_getElementArray  |  mio_alert  |  mio_autoRestart  |  mio_autoShape_apply  |  mio_autoShape_end  |  mio_autoShape_start  |  mio_close  |  mio_createDownloadID  |  mio_data_get  |  mio_data_getBool  |  mio_data_load  |  mio_data_save  |  mio_data_set  |  mio_dialog  |  mio_dialog_close  |  mio_dialog_html  |  mio_execScript  |  mio_fadeIn  |  mio_fadeOut  |  mio_file_get  |  mio_file_load  |  mio_file_save  |  mio_maintenance  |  mio_menu  |  mio_openAtStartup  |  mio_openURL  |  mio_restart  |  mio_run  |  sendToMio

Variables

isDownloading  |  mioData