Zum Hauptinhalt springen

Create XML

XML
<xml:create var="var" var_result="var"/>

<xml:create /> generates a XML document according to the XML 1.0 Specification.

The given variable references the root element and must be an array comprised of the following items:

Key Description

name tag name attr array of attributes with associated name and value pairs nodes array of child nodes including cdata parts cdata cdata value (optionally instead of 'nodes')

Attributes

NameTypeDescriptionDefined By
varvarVariable name xml:create
var_resultvarResult variable name xml:create

Results

BindingTypePredicate
var_resultstringN/A

Examples

XML
<array var="root">
<item key="name">html</item>

<array key="attr">
<item key="xmlns">http://www.w3.org/1999/xhtml</item>
<item key="xml:lang">en</item>
</array>
</array>

<output>
<xml:create var="root"/>
</output>

<!--
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"/>
-->