|
|
|
|
|
|
Function mioxml_getElementArray | Language: PHP
|
Syntax
| mioxml_getElementArray(XML, HTML_TAG, HTML_ATTR) |
Parameters
| STRING | XML | XML data to search in
| | STRING | HTML_TAG | HTML tag to retrieve
| | STRING | HTML_ATTR | Optional. HTML attribute |
Return value
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]);
|
|
|
|