protected function addChild( $attribute, $value = null, $escape = false )
    {
        if ( ! empty( $value )) {
            if ($escape === true) {
                $node = $this->XML->createElement( $attribute );
                $node->appendChild( new \DOMCdataSection( $value ) );
            } else {
                $node = $this->XML->createElement( $attribute, $value );
            }
            $this->mainNode->appendChild( $node );
        }
    }