-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestexml.php
46 lines (21 loc) · 844 Bytes
/
testexml.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 'includes/class.PhpOpenRosa.php';
$varXML = simplexml_load_file("http://www.cadastrofamilias.com.br/xml/familia.php?idPesquisador=6&idComunidade=65");
$varXML->registerXPathNamespace('h', 'http://www.w3.org/1999/xhtml');
$head = $varXML->xpath('//h:head');
$body = $varXML->xpath('//h:body');
$labels = $head[0]->model->itext->translation->text;
$questions = $body[0];
//getLabel($labels, '/data/complementoprincipal/viasdeacesso:hint');
//var_dump($labels);
// print_r($head->model);
foreach($questions as $question) {
if($question->getName() == "group") {
$openGroup = openGroup($question);
foreach ($openGroup->children() as $child)
{
printQuestion($labels, $child);
}
}
printQuestion($labels, $question);
}