element()
element(string|null $element = null, array $attribs = null, string $contents = '', boolean $allowShortTag = true) : string
Format an XML element with given attributes and, optionally, text content.
Element and attribute names are assumed to be ready for literal inclusion. Strings are assumed to not contain XML-illegal characters; special characters (<, >, &) are escaped but illegals are not touched.
Parameters
string|null | $element | element name |
array | $attribs | Name=>value pairs. Values will be escaped. |
string | $contents | NULL to make an open tag only; '' for a contentless closed tag (default) |
boolean | $allowShortTag | whether '' in $contents will result in a contentless closed tag |