summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-09-27 03:54:01 +0200
committeradmin <devnull@localhost>2006-09-27 03:54:01 +0200
commit5abd04902b11472cd8243280f0c08687325c5e90 (patch)
tree86b97994967d2089f2c7c2df363b24e7594ece04 /system/database
parent913ffb7af39d07eefb887e1c8faaf25e0ae79097 (diff)
Diffstat (limited to 'system/database')
-rw-r--r--system/database/DB_export.php34
1 files changed, 5 insertions, 29 deletions
diff --git a/system/database/DB_export.php b/system/database/DB_export.php
index 8d6446cb6..a2e3e3e4c 100644
--- a/system/database/DB_export.php
+++ b/system/database/DB_export.php
@@ -112,8 +112,11 @@ class CI_DB_export {
// Create variables for convenience
extract($params);
+ // Load the xml helper
+ $obj =& get_instance();
+ $obj->load->helper('xml');
+
// Generate the result
-
$xml = "<{$root}/>".$newline;
foreach ($query->result_array() as $row)
{
@@ -121,7 +124,7 @@ class CI_DB_export {
foreach ($row as $key => $val)
{
- $xml .= $tab.$tab."<{$key}>".$this->_xml_convert($val)."</{$key}>".$newline;
+ $xml .= $tab.$tab."<{$key}>".xml_convert($val)."</{$key}>".$newline;
}
$xml .= $tab."</{$element}>".$newline;
}
@@ -130,33 +133,6 @@ class CI_DB_export {
return $xml;
}
-
- // ------------------------------------------------------------------------
-
- /**
- * Convert Reserved XML characters to Entities
- *
- * @access public
- * @param string
- * @return string
- */
- function _xml_convert($str)
- {
- $temp = '__TEMP_AMPERSANDS';
-
- $str = preg_replace("/&#(\d+);/", "$temp\\1;", $str);
- $str = preg_replace("/&(\w+);/", "$temp\\1;", $str);
-
- $str = str_replace(array("&","<",">","\"", "'", "-"),
- array("&amp;", "&lt;", "&gt;", "&quot;", "&#39;", "&#45;"),
- $str);
-
- $str = preg_replace("/$temp(\d+);/","&#\\1;",$str);
- $str = preg_replace("/$temp(\w+);/","&\\1;", $str);
-
- return $str;
- }
-
}
?> \ No newline at end of file