修复xml变量未传递的错误

This commit is contained in:
wlx 2012-12-13 07:05:28 +00:00
parent 9bcfc83d5a
commit 918697085d
1 changed files with 4 additions and 1 deletions

View File

@ -123,6 +123,7 @@ class ISO19115
public $keytypecode=array(1=>'discipline','place','stratum','temporal','theme');
public $author;
public $error=array();
public $xml;
function __construct()
{
@ -142,6 +143,7 @@ class ISO19115
function loadXML($str)
{
@$this->dom->loadXML($str);
$this->xml=$str;
$this->parse();
}
/**
@ -316,8 +318,9 @@ class ISO19115
}
$this->save("../data/import/$this->uuid.xml");
//处理XML入库
if (!empty($xml)) $this->xml=$xml;
$sql="insert into xml (id,data) values(?,?)";
$db->query($sql,array($id,$xml));
$db->query($sql,array($id,$this->xml));
} catch (Exception $e) {
//数据重复插入,此处忽略所有错误
print $this->uuid.' has error: '.$e->getMessage().'<br />';