Predefined entities in XPath queries  Empty elements

Chapter 3: XML Language and XML Query Language

White space

All white space is preserved, and is significant in queries.

select xmlextract("/a[@atr='  this  or  that  ' ]",
     "<a atr='  this  or  that  '><b>  which  or  what
      </b></a>")
-------------------------------------------------
     <a atr="  this  or  that  ">
     <b>  which  or  what  </b></a>

select xmlextract("/a[b='  which  or  what  ']",
      "<a atr='  this  or  that  '><b>  which  or  what
       </b></a>")
---------------------------------------------
      <a atr='  this  or  that  '>
       <b>  which  or  what  </b></a> 




Copyright © 2005. Sybase Inc. All rights reserved. Empty elements

View this book as PDF