[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8124] Property: alter to use DOMDocument on xml impo
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [8124] Property: alter to use DOMDocument on xml import from catch |
Date: |
Thu, 17 Nov 2011 18:17:29 +0000 |
Revision: 8124
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8124
Author: sigurdne
Date: 2011-11-17 18:17:28 +0000 (Thu, 17 Nov 2011)
Log Message:
-----------
Property: alter to use DOMDocument on xml import from catch
Modified Paths:
--------------
trunk/property/inc/cron/default/catch_ppc.php
Modified: trunk/property/inc/cron/default/catch_ppc.php
===================================================================
--- trunk/property/inc/cron/default/catch_ppc.php 2011-11-17 13:33:53 UTC
(rev 8123)
+++ trunk/property/inc/cron/default/catch_ppc.php 2011-11-17 18:17:28 UTC
(rev 8124)
@@ -177,17 +177,31 @@
throw new Exception(lang('no valid
target'));
}
- $xmlparse = CreateObject('property.XmlToArray');
- $xmlparse->setEncoding('UTF-8');
+// $xmlparse = CreateObject('property.XmlToArray');
+// $xmlparse->setEncoding('UTF-8');
$file_list = $this->get_files();
$i = 0;
foreach ($file_list as $file)
{
- $var_result =
$xmlparse->parseFile($file);
- $var_result =
array_change_key_case($var_result, CASE_LOWER);
-
+ $xml = new DOMDocument('1.0', 'utf-8');
+ $xml->load($file);
+
+ $var_result = array();
+
+
//_debug_array($xml->getElementsByTagName('PPCC')->item(0)->getattribute('UUID'));die();
+
+ foreach($metadata as $field =>
$field_info)
+ {
+ $var_result[$field] =
$xml->getElementsByTagName($field)->item(0)->nodeValue;
+ }
+ $var_result['unitid'] =
$xml->getElementsByTagName('UnitID')->item(0)->nodeValue;
+// _debug_array($var_result);die();
+
+// $var_result =
$xmlparse->parseFile($file);
+// $var_result =
array_change_key_case($var_result, CASE_LOWER);
+
//data
$insert_values = array();
$cols = array();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8124] Property: alter to use DOMDocument on xml import from catch,
Sigurd Nes <=