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

  Functions
comma
copy
count
disk_file_list
disk_file_load
disk_file_save
disk_folder_copy
disk_folder_list
disk_folder_remove
explode
get_baseURL
get_currentPath
implode
mioDb_connect
mioDb_query
mioxml_getElement
mioxml_getElementArray
mioxml_getOuter
settingsSetSimpleValue
settingsStringToArray
settingsToArray
strlen
strpos
strrpos
strtolower
strtotime
strtoupper
str_decrypt
str_encrypt
str_posEx
str_replace
str_split
substr

  Libraries
miodb_lib.php
mio_wlib.php
stats_read.php
stats_write.php

Function
mioxml_getElementArray

Language: PHP


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

Searches 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.




PHP 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 PHP code to retrieve the content of the tag VERSION
// is as follow:

$x = disk_file_load("myFile.xml");
$item = mioxml_getElementArray($x, "ITEM");
echo($item[0]);