CXml2Array CXml2Array(
[mixed
$node = '']
)
|
|
Class initializer
Parameters:
mixed |
$node: |
object DOM XML or array returned by GetTag |
API Tags:
Dump the array contents in human format.
Usefull for debug purpose
API Tags:
array EachAttribute(
[bool
$reset = FALSE]
)
|
|
The function iterate over attribute's array of the root element
Parameters:
bool |
$reset: |
Set to TRUE to reset the internal pointer |
API Tags:
The function iterate over tag's array of the root element
Public method
Parameters:
bool |
$reset: |
Set to TRUE to reset the internal pointer |
API Tags:
array EachChildArray(
[bool
$reset = FALSE]
)
|
|
The function iterate over tag's array of the root element
Public method
Parameters:
bool |
$reset: |
Set to TRUE to reset the internal pointer |
API Tags:
bool ExistAttribute(
string
$AttribName
)
|
|
Does exist the request attribute? The function looks only if the attribute exists as child of the root element.
Parameters:
API Tags:
bool ExistTag(
string
$TagName
)
|
|
Does exist the request tag? The function looks only if the tag exists as child of the root element.
Parameters:
API Tags:
Return the XML as array
API Tags:
string GetAttribute(
string
$AttribName
)
|
|
Return value of the named attribute
Parameters:
API Tags:
Return the name of the root tag
API Tags:
array GetTag(
string
$TagName
)
|
|
The function return all childs of the root element named $TagName
Parameters:
API Tags:
array GetTagAttributes(
string
$TagName, [integer
$Position = 0]
)
|
|
The function return all attributes of $TagName. Note $TagName should be a child of the
root element
Parameters:
string |
$TagName: |
|
integer |
$Position: |
Select from which child retrieve the information, if more child of root element have the same name |
API Tags:
array GetTagChilds(
string
$TagName, [integer
$Position = 0]
)
|
|
The function return all childs of $TagName. Note $TagName should be a child of the
root element
Parameters:
string |
$TagName: |
|
integer |
$Position: |
Select from which child retrieve the information, if more child of root element have the same name |
API Tags:
array GetTagPos(
string
$TagName, [mixed
$Position = 0]
)
|
|
The function return all childs of the root element named $TagName
Parameters:
API Tags:
Return value of the root tag
API Tags:
void LoadFromArray(
array
$data
)
|
|
Load the array from another array retrieved from this class.
It is usefull to apply the module's function to the deepest part of the original array
Parameters:
bool LoadFromFile(
string
$FileName
)
|
|
Load data from filename
Parameters:
string |
$FileName: |
filename |
API Tags:
Return: | true if the file is successfully parsed |
Access: | public |
bool LoadFromString(
string
$XmlStr
)
|
|
Load data from xml string
Parameters:
API Tags:
Return: | true if the file is successfully parsed |
Access: | public |
The function iterate over tag's array of the root element
Parameters:
bool |
$reset: |
Set to TRUE to reset the internal pointer (return TRUE) |
bool |
$ReturnObj: |
Set to TRUE to return an object CXml2Array, o FALSE to return tha child's value as array |
API Tags:
See: | _EachChildArray() |
See: | _EachChild() |
Access: | public |
Return True if the current PHP version is 5
False if is PHP4
API Tags: