Hello Everyone
I am a newbie to baseX
For the following xml, how can I select all the transactions with type udp. This command doesn't work:
for $transation in doc('test')//transation
where $transation/istype='udp'
return <transation>{ $transation/@id }</transation>
Thanks a million
Serena Wang
<root>
<Journal>
<Document id="1">
<Author name="do-not-reply%40domaintools.com" reputation="1.0"/>
<Time>Sat, 1 May 2010 00:55:20 -0700 (PDT)</Time>
<Entity>
<URL>http%3A%2F%2Fwww.domaintools.com%2Fmark-alert%2F</URL>
<Domain>mexicoisart.com</Domain>
<IP>199.236.158.250</IP>
</Entity>
</Document>
<Document id="2">
<Author name="apache%40den.giac.net+%28Apache%29" reputation="10.0"/>
<Time>Sat, 1 May 2010 10:35:54 +0000 (UTC)</Time>
<Entity>
<URL>https%3A%2F%2Fisc.sans.org%2Fdiary.html%3Fstoryid%3D8605</URL>
<IP>66.28.0.45</IP>
</Entity>
</Document>
</Journal>
<transactions>
<transation id="56977">
<time>09 Sep 10 23:00:52</time>
<istype type="type1"/>
<src>10.8.124.143</src>
<dst>66.28.0.45</dst>
<status>INT</status>
</transation>
</transactions>
<types>
<type id="type1">
<name>udp</name>
</type>
</types>
</root>