<< Index

XPath: Predicates

Page | Source
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>   
    <title>XQIB: Sample page</title>
    <meta charset="UTF-8"/>
    <script type="text/javascript" src="mxqueryjs/mxqueryjs.nocache.js"></script>
    <script type="application/xquery">
      b:alert(b:dom()//div[@id="paragraph1"]/data(.))
    </script>
  </head>
  <body>
    <h1>XPath: Predicates</h1>
    <div id="paragraph1">Foo</div>
    <div id="paragraph2">Bar</div>
  </body>
</html>