/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to trunk/CodeViewer/DomExample3b/DomExample3bcode.php

  • Committer: a11emmjo
  • Date: 2013-05-28 08:51:26 UTC
  • mto: This revision was merged to the branch mainline in revision 110.
  • Revision ID: a11emmjo@student.his.se-20130528085126-16sx38szwbsx1coh
Changed so that cms-controller loads filetree (before known as examplesController, examplesBody, examplesMenu).

Also changed to describing filenames and names for attributes and functions in css, php-view and in model that is used for this.

Started working on cmsindex-view and -css.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html>
2
 
<body>
3
 
<pre>
4
 
 
5
 
<?PHP
6
 
        $dom = new DomDocument;
7
 
        $dom->preserveWhiteSpace = FALSE;
8
 
 
9
 
        $file = '../XMLData/example1b.xml';
10
 
        $loadstate=$dom->load($file);   
11
 
        
12
 
        $xp = new DOMXPath($dom);
13
 
        
14
 
        
15
 
        $xpathString="//car";
16
 
        echo "<b>Example: ".$xpathString."</b><br>";
17
 
        $nodes = $xp->query($xpathString);
18
 
        foreach ($nodes as $node) {
19
 
 
20
 
                        $xpathString="./color";
21
 
                        echo "<b>Example: ".$xpathString."</b><br>";
22
 
                        $innernodes = $xp->query($xpathString,$node);
23
 
                        foreach ($innernodes as $innernode) {
24
 
                                        echo "    Name:".$innernode->nodeValue."<br>";
25
 
                        }
26
 
 
27
 
  }
28
 
 
29
 
?>
30
 
</pre>
31
 
</body>
32
 
</html>
 
 
b'\\ No newline at end of file'