/lenasys/0.1

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

« back to all changes in this revision

Viewing changes to trunk/CodeViewer/DomExample1/DomExample1.txt

  • Committer: Henrik G.
  • Date: 2013-03-26 23:22:55 UTC
  • Revision ID: henrik.gustavsson@his.se-20130326232255-ik6snyatlbkf3zs1
First seed of Lenasys ... Needs to be Organized Further

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html>
 
2
<body>
 
3
<pre>
 
4
<?php
 
5
 
 
6
                $file = 'example1.xml';
 
7
                
 
8
                $dom = new DomDocument;
 
9
                $dom->preserveWhiteSpace = FALSE;
 
10
                $dom->load($file);
 
11
                
 
12
                $person = $dom->documentElement;
 
13
                echo $person->tagName."<br>";
 
14
                foreach ($person->childNodes as $child){
 
15
                                echo " ".$child->tagName;
 
16
                                echo "<br>   ".$child->nodeValue."<br>";
 
17
                }
 
18
        
 
19
?>
 
20
</pre>
 
21
</body>
 
22
</html>
 
 
b'\\ No newline at end of file'