 <p>The Exception <code>DOMException</code> with the message </p> <blockquote> <p>Invalid Character Error</p> </blockquote> <p>means that you have tried to create an element (<a href="http://php.net/DOMDocument.createElement" rel="nofollow"><code>DOMDocument::createElement()</code></a>) containing invalid characters in the element name:</p> <pre><code>$mydom-&gt;createElement($name, $link) ^ | first parameter is the element name </code></pre> <p>In XML not every name is valid, some even contain invalid characters (for example a space <code>" "</code> or the backslash <code>/</code>) or invalid byte-sequences that aren't anything from the Unicode UTF-8 range. DOMDocument in PHP accepts UTF-8 as input only. So for for general. If you want to learn in depth which characters are valid in XML element names you can find more information that you will likely ever need in your live in <a href="http://stackoverflow.com/questions/2519845/how-to-check-if-string-is-a-valid-xml-element-name"><em>How to check if string is a valid XML element name?</em></a>.</p> <p>So for now if you look closely to the stacktrace of the error message you can probably even spot the problem:</p> <blockquote> <pre><code>DOMDocument-&gt;createElement('/joomla/compone...', 'Arduino') ^ ^ </code></pre> </blockquote> <p>The <code>/</code> character is not valid inside an XML element name. Fix the issue and you should be able to just add your stuff. Just use an element name that is valid in the end.</p>