Xml - adampatterson/Dingo-Framework GitHub Wiki

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);
⚠️ **GitHub.com Fallback** ⚠️