xml_document->createElement

Creates an XML element.

Target member

Signature

1xml_document->createElement(tagName::string)

Creates an XML element.

xml_document->createElement is called with member syntax on a receiver value. xml_document->createElement works with structured document or media data. Keep parsing, transformation, and output steps separate enough that each step can be checked on its own.

Parameters

tagName
Required value of type string. Supply tagName positionally unless the signature shows a keyword form.

Examples

Basic call

1xml()->createElement('item')
The example shows the normal call shape. Adapt variable names, validation, and surrounding error handling to the context.