AAAAhome/academiac/www/administrator/components/com_csvi/helpers/file/export/xml/oodle.php 0000604 00000004715 15147636030 0025403 0 ustar 00 contents = ''.chr(10);
$this->contents .= ''.chr(10);
return $this->contents;
}
/**
* Creates the XML footer
*
* @see $contents
* @return string XML header
*/
function FooterText() {
$this->contents = ''.chr(10);
return $this->contents;
}
/**
* Opens an XML item node
*
* @see $contents
* @return string XML node data
*/
function NodeStart() {
$this->contents = '
'.chr(10);
return $this->contents;
}
/**
* Closes an XML item node
*
* @see $contents
* @return string XML node data
*/
function NodeEnd() {
$this->contents = ''.chr(10);
return $this->contents;
}
/**
* Adds an XML element
*
* @see $node
* @return string XML element
*/
function Element($column_header, $cdata=false) {
$this->node = '<'.$column_header.'>';
if ($cdata) $this->node .= 'node .= $this->contents;
if ($cdata) $this->node .= ']]>';
$this->node .= ''.$column_header.'>';
$this->node .= "\n";
return $this->node;
}
/**
* Handles all content and modifies special cases
*
* @see $contents
* @return string formatted XML element
*/
function ContentText($content, $column_header, $fieldname, $cdata=false) {
switch ($fieldname) {
case 'manufacturer_name':
case 'product_url':
$cdata = true;
default:
$this->contents = $content;
break;
}
if (empty($column_header)) $column_header = $fieldname;
return $this->Element($column_header, $cdata);
}
}
?>