Index: /trunk/include/xml.php
===================================================================
--- /trunk/include/xml.php	(revision 38)
+++ /trunk/include/xml.php	(revision 39)
@@ -14,4 +14,5 @@
 # and returns an equivalent PHP data structure
 ###################################################################################
+if( ! function_exists( 'XML_unserialize' ) ) : // d3pipe Used function
 function & XML_unserialize(&$xml){
 	$xml_parser = &new XML();
@@ -20,8 +21,10 @@
 	return $data;
 }
+endif;
 ###################################################################################
 # XML_serialize: serializes any PHP data structure into XML
 # Takes one parameter: the data to serialize. Must be an array.
 ###################################################################################
+if( ! function_exists( 'XML_serialize' ) ) : // d3pipe Used function
 function & XML_serialize(&$data, $level = 0, $prior_key = NULL){
 	if($level == 0){ ob_start(); echo '<?xml version="1.0" ?>',"\n"; }
@@ -49,4 +52,5 @@
 	if($level == 0){ $str = &ob_get_contents(); ob_end_clean(); return $str; }
 }
+endif;
 ###################################################################################
 # XML class: utility class to be used with PHP's XML handling functions
@@ -60,16 +64,28 @@
 
 	function XML(){
- 		$this->parser = &xml_parser_create();
+ 		// $this->parser = &xml_parser_create();
+ 		$this->parser = xml_parser_create(); // GIJ
+ 		/*
 		xml_parser_set_option(&$this->parser, XML_OPTION_CASE_FOLDING, false);
 		xml_set_object(&$this->parser, &$this);
 		xml_set_element_handler(&$this->parser, 'open','close');
 		xml_set_character_data_handler(&$this->parser, 'data');
+		*/
+		xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false);
+		xml_set_object($this->parser, $this);
+		xml_set_element_handler($this->parser, 'open','close');
+		xml_set_character_data_handler($this->parser, 'data');
 	}
-	function destruct(){ xml_parser_free(&$this->parser); }
+	function destruct(){
+		// xml_parser_free(&$this->parser); // GIJ
+		xml_parser_free($this->parser);
+	}
 	function & parse(&$data){
 		$this->document = array();
 		$this->stack    = array();
 		$this->parent   = &$this->document;
-		return xml_parse(&$this->parser, &$data, true) ? $this->document : NULL;
+		// return xml_parse(&$this->parser, &$data, true) ? $this->document : NULL; // GIJ
+		$ret = @xml_parse($this->parser, $data, true) ? $this->document : NULL;
+		return $ret ;
 	}
 	function open(&$parser, $tag, $attributes){
