Last active
April 3, 2019 10:08
-
-
Save kontur32/af4ff8872b71eb5184e6ef3d94adc52d to your computer and use it in GitHub Desktop.
Сравнение_элементов_XML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(: поиск элементов, которые есть в одном, но отсутствуют в другом :) | |
let $big := | |
<PERSONS> | |
<PERSON> | |
<ID>1</ID> | |
<NAME>Иванов</NAME> | |
</PERSON> | |
<PERSON> | |
<ID>2</ID> | |
<NAME>Петров</NAME> | |
</PERSON> | |
<PERSON> | |
<ID>3</ID> | |
<NAME>Сидоров</NAME> | |
</PERSON> | |
</PERSONS> | |
let $small := | |
<PERSONS> | |
<PERSON> | |
<ID>2</ID> | |
<NAME>Петров</NAME> | |
</PERSON> | |
</PERSONS> | |
for $var in $big/PERSON | |
where $var[ ID != $small//ID ] | |
return | |
$var | |
(: | |
<PERSON> | |
<ID>1</ID> | |
<NAME>Иванов</NAME> | |
</PERSON> | |
<PERSON> | |
<ID>3</ID> | |
<NAME>Сидоров</NAME> | |
</PERSON> | |
:) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment