| <html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Union, Intersection and Except</title><link href="book.css" rel="stylesheet" type="text/css"><link href="../book.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.74.0" name="generator"><link rel="home" href="index.html" title="XPath 2.0 Processor User Manual"><link rel="up" href="ch04.html" title="How to use XPath 2.0 operators with PsychoPath"><link rel="prev" href="ch04s07.html" title="Operators Related to QNames And Nodes"><link rel="next" href="ch04s09.html" title="Operators that Generate Sequences"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="Union.2C_Intersection_and_Except"></a>Union, Intersection and Except</h2></div></div></div><p><pre class="programlisting">union($seq2, $seq3)</pre></p><p>from within a Java application, in order to extract the result |
| from the result sequence, one would have to use this code:</p><pre class="programlisting">for (Iterator iter = rs.iterator(); iter.hasNext();) { |
| Object item = iter.next(); |
| String n = ((XSString)item).stringvalue(); |
| print(n + ", "); |
| } |
| println(""); |
| </pre><p> </p><p>which returns the sequence consisting of $item1, $item2, |
| $item3.</p><p></p></div></body></html> |