Mercurial > hg > extraction-interface
comparison models/extractapp.php @ 70:359f48d58cbc extractapp
New: hover on regex elem
| author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
|---|---|
| date | Wed, 08 Apr 2015 14:22:44 +0200 |
| parents | edb8a2e8ce84 |
| children | 26d8c4c43d86 |
comparison
equal
deleted
inserted
replaced
| 69:edb8a2e8ce84 | 70:359f48d58cbc |
|---|---|
| 309 // topic | 309 // topic |
| 310 $text .= "<topic>".$this->topic."</topic>\n"; | 310 $text .= "<topic>".$this->topic."</topic>\n"; |
| 311 // book meta data | 311 // book meta data |
| 312 $book = $this->book_meta; | 312 $book = $this->book_meta; |
| 313 foreach ($book as $b) { | 313 foreach ($book as $b) { |
| 314 | |
| 315 $text .= "<book>\n"; | 314 $text .= "<book>\n"; |
| 316 $text .= "<id>".$b[0]."</id>\n"; | 315 $text .= "<id>".$b[0]."</id>\n"; |
| 317 $text .= "<name>".$b[1]."</name>\n"; | 316 $text .= "<name>".$b[1]."</name>\n"; |
| 318 $text .= "<level1>".$b[2]."</level1>\n"; | 317 $text .= "<level1>".$b[2]."</level1>\n"; |
| 319 $text .= "<level2>".$b[3]."</level2>\n"; | 318 $text .= "<level2>".$b[3]."</level2>\n"; |
| 1145 // get book meta data from file | 1144 // get book meta data from file |
| 1146 $book_meta = $xml->book; | 1145 $book_meta = $xml->book; |
| 1147 $book_metaArray = array(); | 1146 $book_metaArray = array(); |
| 1148 foreach ($book_meta as $row) { | 1147 foreach ($book_meta as $row) { |
| 1149 array_push($book_metaArray, array((string)$row->id,(string)$row->name,(string)$row->level1,(string)$row->level2, | 1148 array_push($book_metaArray, array((string)$row->id,(string)$row->name,(string)$row->level1,(string)$row->level2, |
| 1150 (string)$row->period,(string)$row->dynasty,$row->start_year,$row->end_year,$row->line, | 1149 (string)$row->period,(string)$row->dynasty,(string)$row->start_year,(string)$row->end_year,(string)$row->line, |
| 1151 (string)$row->volume,(string)$row->author,(string)$row->edition,(string)$row->in_jibengujiku,(string)$row->admin_type )); | 1150 (string)$row->volume,(string)$row->author,(string)$row->edition,(string)$row->in_jibengujiku,(string)$row->admin_type )); |
| 1152 } | 1151 } |
| 1153 if ($book_metaArray) { | 1152 if ($book_metaArray) { |
| 1154 $this->book_meta = $book_metaArray; | 1153 $this->book_meta = $book_metaArray; |
| 1155 } | 1154 } |
