- * @param array $array The array of the XML structure that will be generated
- * @param object $xml The createdXML will be returned by reference
- * @param bool $remove_header Should the XML header be removed or not?
- * @param array $namespaces List of namespaces
- * @param bool $root interally used parameter. Mustn't be used from outside.
- * @return void
+ * @param array $array The array of the XML structure that will be generated
+ * @param object|null $xml The created XML will be returned by reference
+ * @param bool $remove_header Should the XML header be removed or not?
+ * @param array $namespaces List of namespaces
+ * @param bool $root interally used parameter. Mustn't be used from outside.
+ * @return string
+ * @throws \Exception