Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
XML_Converter Class Reference
Inheritance diagram for XML_Converter:

Public Member Functions

 getStringFromArray ($xml=NULL, $no_header=false)
 
 getArrayFromFile ($xml_file)
 
 getArrayFromString ($xml)
 
 getElementContent (&$parent, $element_name, $default_value=NULL)
 
 _getStringFromArrayInternal ($xml=NULL, $parent_tag=0)
 
 close ()
 
 _reset ()
 
 startHandler ($xp, $elem, &$attribs)
 
 endHandler ($xp, $elem)
 
 cdataHandler ($xp, $data)
 

Data Fields

 $array_xml
 
 $indent_xml = false
 
 $compact_array = false
 
 $tag_level = 0
 

Detailed Description

Definition at line 54 of file xml_converter.inc.

Member Function Documentation

_getStringFromArrayInternal (   $xml = NULL,
  $parent_tag = 0 
)

Internal function to converts an xml-array into a string

Parameters
mixed$xmlpart of a xml-array
string$parent_tagname of the parent element
Returns
array() private

Definition at line 191 of file xml_converter.inc.

_reset ( )

reset object, prepare it to be used

Returns
void private

Definition at line 273 of file xml_converter.inc.

cdataHandler (   $xp,
  $data 
)

Element Content event handler for the XML parser No need to decode entities, the default php parser already does it.

Returns
void private

Definition at line 335 of file xml_converter.inc.

close ( )

clean up object

Returns
void public

Definition at line 258 of file xml_converter.inc.

endHandler (   $xp,
  $elem 
)

End element event handler for the XML parser

Returns
void private

Definition at line 310 of file xml_converter.inc.

getArrayFromFile (   $xml_file)

Converts a file containing a xml-string into a xml-array

Parameters
string$xml_filefile name
Returns
array() public

Definition at line 124 of file xml_converter.inc.

getArrayFromString (   $xml)

Converts a xml-string into a xml-array

Parameters
string$xmla well formed xml-string to convert
Returns
array() public

Definition at line 147 of file xml_converter.inc.

getElementContent ( $parent,
  $element_name,
  $default_value = NULL 
)

Returns the content of an element

Parameters
array()&$parent the parent element as a xml-array
string$element_nameelement name
boolean$default_valuedefault value if the element doesn't exists
Returns
string public

Definition at line 169 of file xml_converter.inc.

getStringFromArray (   $xml = NULL,
  $no_header = false 
)

Converts a xml-array into a xml-string

Parameters
array()$xml xml-array to convert
boolean$no_headerif true, add a xml header
Returns
string public

Definition at line 99 of file xml_converter.inc.

startHandler (   $xp,
  $elem,
$attribs 
)

Start element event handler for the XML parser

Returns
void private

Definition at line 291 of file xml_converter.inc.


The documentation for this class was generated from the following file: