Skip to content

tonivdv/PhpDomUtils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Php Dom Utils

Build Status

Provides an easy way to fill a DOMDocument with an array

$array = array(
  "nodes" => array(
    "node" => array(
      0 => "text1",
      1 => "text2"
    )));

$dom = new \DOMDocument('1.0', 'utf-8');

PhpDomUtils::fillDom($dom, $array);

echo $dom->saveXML();

Above example would output:

<?xml version="1.0" encoding="utf-8"?>
<nodes>
  <node>text1</node>
  <node>text2</node>
</nodes>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages