protected function writeFullXmlNode($nodeName, $value, $level, $attributes = array()) { $res = ''; $res .= $this->writeOpenXmlNode($nodeName, $level, $attributes, false); $res .= kString::xmlEncode(kString::xmlDecode("{$value}")); //to create a valid XML (without unescaped special chars) //we decode before encoding to avoid breaking an xml which its special chars had already been escaped $res .= $this->writeClosingXmlNode($nodeName, 0); return $res; }