/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 CodeViewer/DomExample3b/DomExample3b.html

  • Committer: Gustav Hatvigsson
  • Date: 2013-05-17 09:46:50 UTC
  • mfrom: (69.3.3 lenasys)
  • Revision ID: gustav.hartvigsson@gmail.com-20130517094650-cjpddwztwm0hh0pk
Merged Gostavssons changes: rwemoved lots of old files and changed to the database file.

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'