forked from scieloorg/Web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ArticleServicesResult.php
45 lines (36 loc) · 1.53 KB
/
ArticleServicesResult.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
require_once(dirname(__FILE__)."/ServiceResult.php");
require_once(dirname(__FILE__)."/../Article.php");
class ArticleServicesResult extends ServiceResult {
/* ===================================================================== */
function ArticleServicesResult($stringXml){
$this->ServiceResult($stringXml);
}
function getArticle(){
$article = new Article();
if (!$this->domLiteDocument) die("not domLiteDocument...");
$temp = &$this->domLiteDocument->getElementsByPath("/SERIAL");
for ($i=0;$i<$temp->getLength();$i++){
$item = $temp->item($i);
$article->setSerial($this->getNodeText($item, 'TITLEGROUP/TITLE'));
}
$temp = &$this->domLiteDocument->getElementsByPath("//ISSUEINFO");
for ($i=0;$i<$temp->getLength();$i++){
$item = $temp->item($i);
$article->setVolume($this->getNodeAttribute($item, 'VOL'));
$article->setNumber($this->getNodeAttribute($item, 'NUM'));
$article->setSuppl($this->getNodeAttribute($item, 'SUPPL'));
$article->setYear($this->getNodeAttribute($item, 'YEAR'));
}
$temp = &$this->domLiteDocument->getElementsByPath("//ARTICLE");
for ($i=0;$i<$temp->getLength();$i++){
$item = $temp->item($i);
$article->setPublicationDate($this->getNodeText($item, 'publication-date'));
$article->setTitle($this->getNodeXML($item, 'TITLES'));
$article->setAuthorXML($this->getNodeXML($item, 'AUTHORS'));
$article->setKeywordXML($this->getNodeXML($item, 'KEYWORDS'));
}
return $article;
}
}//class
?>