Index: branches/RC/core/units/general/xml_helper.php =================================================================== diff -u -r9639 -r10251 --- branches/RC/core/units/general/xml_helper.php (.../xml_helper.php) (revision 9639) +++ branches/RC/core/units/general/xml_helper.php (.../xml_helper.php) (revision 10251) @@ -204,24 +204,31 @@ /** * Reconstructs XML of the node and subnodes * + * $param bool $content_only */ - function GetXML() + function GetXML($content_only = false) { - $xml = '<'.$this->Name; - if (count($this->Attributes)) { - $xml .= ' '; - $att_contents = array(); - foreach ($this->Attributes as $name => $value) { - $att_contents[] = $name.'="'.$value.'"'; + $xml = ''; + if (!$content_only) { + $xml = '<'.$this->Name; + if (count($this->Attributes)) { + $xml .= ' '; + $att_contents = array(); + foreach ($this->Attributes as $name => $value) { + $att_contents[] = $name.'="'.$value.'"'; + } + $xml .= implode(' ', $att_contents); } - $xml .= implode(' ', $att_contents); + $xml .= '>'; } - $xml .= '>'.$this->Data; - foreach ($this->Children as $node) - { + $xml .= $this->Data; + foreach ($this->Children as $node) { $xml .= $node->GetXML(); } - $xml .= 'Name.'>'; + + if (!$content_only) { + $xml .= 'Name.'>'; + } return $xml; } }