Dingo Framework

Dingo is a Rapid Development Application Framework written in PHP. Dingo allows you to create dynamic changing websites easily and quickly.

XML Library

Overview

The XML library serializes and de-serilizes XML without changing or losing data. To load the XML helper manually you may do this:

load::library('xml');

Serializing XML

To turn XML into an array that you can manipulate just do this:

$xml = '<html>
  <head>
    <title>My Title</title>
    <link rel="stylesheet" type="text/css" href="styles.css" />
  </head>
  <body>
  
  <p>Hello, World!</p>
  
  </body>
</html>';

$data = xml::parse($xml);

xml::parse will return FALSE if the supplied XML is invalid. Otherwise, it will return an array.

De-serializing XML

To turn serialized XML back into XML do this:

$xml = xml::build($data);

© 2008 - 2010 Evan Byrne