User Contributed Notes 5 notes

The documentation is a bit sparse for SimpleXmlIterator. Here is an example showing the use of its methods. xml2Array and sxiToArray work together to convert an XML document to an associative array structure.

Most of the time we need to convert the XML to array or JSON , but now I have to completed the requirement of converting XML to XPath which make our template easily geting the data from XML data source due to the Xpath mapping .Here is the function: