summaryrefslogtreecommitdiff
path: root/it_xml.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_xml.class')
-rw-r--r--it_xml.class12
1 files changed, 6 insertions, 6 deletions
diff --git a/it_xml.class b/it_xml.class
index 5dd4ead..fa67c4c 100644
--- a/it_xml.class
+++ b/it_xml.class
@@ -27,11 +27,11 @@ class it_xml
* Add xml snippet as attribute tree to $this
* @param $xmldata XML string or filehandle (result from fopen) to parse
* @param $p associative array
- * forcearray xml tags to ALWAYS return as array
- * safety value 2 causes program abort with invalid xml, 1 causes error report
- * encoding Output character encoding (e.g. UTF-8, default: ISO-8859-1)
- * prefix Optional prefix for class names
- * lowercase Lowercase all tag and attribute names
+ * @param $p['forcearray'] xml tags to ALWAYS return as array
+ * @param $p['safety'] 2 causes program abort with invalid xml, 1 (default) causes error report, 0 just returns false
+ * @param $p['encoding'] Output character encoding (e.g. UTF-8, default: ISO-8859-1)
+ * @param $p['prefix'] Optional prefix for class names
+ * @param $p['lowercase'] Lowercase all tag and attribute names
* @return XML object tree or null on failure
*/
@@ -55,7 +55,7 @@ function create($xmldata, $p = array())
function from_xml($xmldata, $p)
{
- $this->_p = $p + array('encoding' => "ISO-8859-1");
+ $this->_p = $p + array('encoding' => "ISO-8859-1", 'safety' => 1);
$this->_arrayforce = array_flip((array)$this->_p['forcearray']);
$this->_stack = array();
unset($this->error);