/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/DomExample3b/DomExample3b.htm

  • 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
<span class="description">
 
2
<br>
 
3
<div class="descriptionheading">Overview</div>
 
4
This example shows how we can change the context node for the XPATH processing so that it executes from another node than the root node.
 
5
<br><br>
 
6
<div class="descriptionheading">Context Nodes</div>
 
7
In PHP the XPATH engine uses the root node as the default context node.<br/><br/>
 
8
In newer versions of PHP we can add an optional context node from the document which allows us to execute a query from  
 
9
any node in the document.<br/><br/>
 
10
In this case we use <span class="interestingdescription">$node</span> as the context node and thus are executing ./color for each car, and not for the root of the document.
 
11
<br><br>
 
12
<div class='exampleheading'>Web Page Output:<br><br>
 
13
<img src='DomExample3b.png'>
 
14
</div>
 
15
                                                                                                                                        
 
16
</span>
 
 
b'\\ No newline at end of file'