Fix Escape and Ampersand bug With addChild Method

The class `SimpleXMLElement` `addChild` method doesn't protect against adding values with ampersand and escape characters to an XML node causing malforming XML. In order to achieve that the child node need to be added first and then assign the value.