Changes between Version 14 and Version 15 of JavaScript-XPath

Show
Ignore:
Timestamp:
11/14/07 17:36:28 (6 years ago)
Author:
amachang (IP: 203.112.24.227)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • JavaScript-XPath

    v14 v15  
    6969== Demo == 
    7070 
    71  * Coming soon. 
    72  
     71 * Simple demo. 
    7372{{{ 
    7473#!js 
    7574//Executable 
    76 // -- First case -- 
    77 // Evaluate a XPath expression string 
    78 var result = document.evaluate('//h1', document, null, 7, null); 
    79 // Display the result 
    80 var h1 = result.snapshotItem(0); 
    81 alert(h1.innerHTML); // Hello, DOM 3 XPath! 
     75var result = document.evaluate('//h1/node()[1]', document, null, 1, null); 
     76alert(result.stringValue); // JavaScript-XPath 
    8277}}} 
    8378