<html>
<head>
<title>XPath-Knotentests</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div id="Beschreibung">
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
<tr>
<td valign="top" class="NAME" colspan="2">XPath-Knotentests</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td valign="top" colspan="2" class="description">

    <p>
<!--<primary>XPath</primary>
  <secondary>node tests for</secondary>--> <!--<primary>node tests for XPath</primary>-->

XPath definiert mehrere Knotentests, mit Hilfe derer sich Knoten aus einem Ausgangsbaum ausw&auml;hlen lassen. Genau genommen, kann jeder XPath-Ausdruck als Knotentest betrachtet werden. Der Ausdruck <span class="LITERAL">para</span> beispielsweise w&auml;hlt alle <span class="LITERAL">&lt;para&gt;</span>-Elemente des Kontextknotens aus. Mehrere spezielle Knotentests erlauben Ihnen die Auswahl von Knoten, die sonst nicht ausgew&auml;hlt werden k&ouml;nnen. (Obwohl sie wie Funktionen aussehen und funktionieren, sind sie technisch gesehen Knotentests.)  Diese speziellen Knotentests sind im Folgenden beschrieben:</p>
    <dl>
<dt>
<span class="LITERAL">
text()
</span>
</dt>
<dd>
<!--<primary>text() node test</primary>--> Dieser Knotentest w&auml;hlt alle Textknotenkinder des Kontextknotens aus.
<P></p>
<dt>
<span class="LITERAL">
comment()
</span>
</dt>
<dd>
<!--<primary>comment() node test</primary>--> Dieser Knotentest w&auml;hlt alle Kommentarknotenkinder des Kontextknotens aus.
<P></p>
<dt>
<span class="LITERAL">
processing-instruction()
</span>
</dt>
<dd>
<!--<primary>processing-instruction() node test</primary>--> Dieser Knotentest w&auml;hlt alle Verarbeitungsanweisungsknoten-Kinder des Kontextknotens aus. Im Gegensatz zu den anderen hier definierten Knotentests kann <span class="LITERAL">
processing-instruction()
</span> ein optionales Argument besitzen; <span class="LITERAL">
processing-instruction('xml-stylesheet')
</span> w&auml;hlt alle Verarbeitungsanweisungen mit dem Namen <span class="LITERAL">
xml-stylesheet
</span> aus.
<P></p>
<dt>
<span class="LITERAL">
node()
</span>
</dt>
<dd>
<!--<primary>node() node test</primary>--> Dieser Knotentest ist f&uuml;r alle Knoten wahr, unabh&auml;ngig von ihrem Typ. Es werden alle Elementknoten, Attributknoten, Verarbeitungsanweisungen usw. ausgew&auml;hlt.
<P></p>
</dl>
</td></tr>
</table>
</div>
</body>
</html>
