Mercurial > hg > webaudioevaluationtool
comparison scripts/score_parser.php @ 1256:4fb8222b96ae
comment/score _parser.php updated to match 'ref' 'name' attribute changes.
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Wed, 16 Mar 2016 16:52:30 +0000 |
parents | 83b439322229 |
children | f22a6240fb51 |
comparison
equal
deleted
inserted
replaced
1255:dcbf87684e99 | 1256:4fb8222b96ae |
---|---|
62 } else { | 62 } else { |
63 // Iterate over each $page node | 63 // Iterate over each $page node |
64 foreach($xml_object->page as $pageInstance) | 64 foreach($xml_object->page as $pageInstance) |
65 { | 65 { |
66 // Find in the nest | 66 // Find in the nest |
67 $pageInstanceId = $pageInstance['id']; | 67 $pageInstanceId = $pageInstance['ref']; |
68 $page_nest = $root->findChild($pageInstanceId); | 68 $page_nest = $root->findChild($pageInstanceId); |
69 if ($page_nest == null) { | 69 if ($page_nest == null) { |
70 $page_nest = $root->addNewChild($pageInstanceId); | 70 $page_nest = $root->addNewChild($pageInstanceId); |
71 } | 71 } |
72 | 72 |
73 // Iterate over each $element node | 73 // Iterate over each $element node |
74 foreach($pageInstance->audioelement as $element) { | 74 foreach($pageInstance->audioelement as $element) { |
75 // Find our specific element tag | 75 // Find our specific element tag |
76 $elementId = $element['id']; | 76 $elementId = $element['name']; |
77 $element_nest = $page_nest->findChild($elementId); | 77 $element_nest = $page_nest->findChild($elementId); |
78 if ($element_nest == null) { | 78 if ($element_nest == null) { |
79 $element_nest = $page_nest->addNewChild($elementId); | 79 $element_nest = $page_nest->addNewChild($elementId); |
80 } | 80 } |
81 // Now get the <value> tags | 81 // Now get the <value> tags |