Reference

Guide

Xml::create()

Creates an XML string from an array

Xml::create(string $props, string $name = 'root', bool $head = true, int $level = 0): string

Parameters

Name Type Default Description
$props string

The source array

$name string 'root'

The name of the root element

$head bool true

Include the xml declaration head or not

$level int 0

The indendation level

Return type

string

Source code

kirby/src/Toolkit/Xml.php#L66