public function addMissing($objStructure, &$objElement)
    {
        // Set missing attributes
        foreach ($objStructure->attributes() as $strName => $objAttribute) {
            if (!isset($objElement->attributes()->$strName)) {
                $objElement->addAttribute($strName, (string)$objAttribute);
            }
        }

        // Add missing nodes
        foreach ($objStructure->children() as $strName => $varNode) {
            if (count($varNode) > 0) {
                // Due to a PHP bug clone does not work
                $objNode = $objElement->addChild($strName);
                $this->addMissing($varNode, $objNode);
            } else {
                $objElement->addChild($strName, (string)$varNode);
            }
        }
    }