diff --git a/outputxml.php b/outputxml.php
index 9a4f7cc..06a23c9 100644
--- a/outputxml.php
+++ b/outputxml.php
@@ -17,13 +17,22 @@ class outputxml extends output
@header('Cache-Control: post-check=0, pre-check=0', false);
@header('Pragma: no-cache');
@header ("Content-Type: text/xml");
- $xml = new SimpleXMLElement ("");
- // function call to convert array to xml
- if (!is_array ($data))
- $data = array ($data);
- $this->array_to_xml ($data, $xml);
- //saving generated xml file
- print $xml->asXML();
+ if (is_string ($data) && substr ($data, 0, 6) === "");
+ // function call to convert array to xml
+ if (!is_array ($data))
+ $data = array ($data);
+ $this->array_to_xml ($data, $xml);
+ //saving generated xml file
+ print $xml->asXML();
+ }
if (!defined ("PHPUNIT"))
exit;
}