00001 <?php
00002
00011 class SnapContentXml extends SnapContent {
00012 protected $NEED_TRANSLATION = false;
00013 protected $xml_error = null;
00014
00024 public function setXML($xml) {
00025 if(is_array($errors = SXMLHelper::validateXML($xml, true)))
00026 return $errors;
00027 $xml2 = SXMLHelper::formatXML($xml);
00028 if(!is_array($xml2))
00029 $xml = $xml2;
00030 else
00031 $this->setWarning('Failed to format: <ul><li>' . implode('</li><li>', $xml2) . '</li></ul>');
00032 $this->setAll($xml);
00033 return true;
00034 }
00035
00043 public function getXML() {
00044 return $this->getAll();
00045 }
00046
00048 protected function validate() {
00049 return true;
00050 }
00051
00053 protected function doGetHTML($params) {
00054 return $this->getAll();
00055 }
00056
00057 public function checkMedia() {
00058 return true;
00059 }
00060
00061 public function updateFileList() {
00062 return true;
00063 }
00064
00069 public static function initialValue() {
00070 return "<XMLResource>\n</XMLResource>\n";
00071 }
00072 }
00073
00074 ?>