xml http://stackoverflow.com/questions/38980559/xquery-test-for-two-specific-children-with-and/38980

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了xml http://stackoverflow.com/questions/38980559/xquery-test-for-two-specific-children-with-and/38980相关的知识,希望对你有一定的参考价值。

xquery version "3.0";

declare namespace tei = "http://www.tei-c.org/ns/1.0";

let $in-memory-node := 
    <persName xmlns="http://www.tei-c.org/ns/1.0" xml:id="person">
        <forename/>
        <surname/>
    </persName>
(:let $on-disk-node := doc('/db/test2.xml')/tei:persName:)
let $on-disk-node := doc('/db/test2.xml')/id('person')
for $node in ($in-memory-node, $on-disk-node)
return
    $node/tei:forename and $node/tei:surname
<persName xmlns="http://www.tei-c.org/ns/1.0" xml:id="person">
    <forename/>
    <surname/>
</persName>
xquery version "3.0";

declare namespace foo = "foo";

let $in-memory-node := 
    <root xmlns="foo">
        <x/>
        <y/>
    </root>
let $on-disk-node := doc('/db/test.xml')/foo:root
for $node in ($in-memory-node, $on-disk-node)
return
    $node/foo:x and $node/foo:y
<root xmlns="foo">
    <x/>
    <y/>
</root>

以上是关于xml http://stackoverflow.com/questions/38980559/xquery-test-for-two-specific-children-with-and/38980的主要内容,如果未能解决你的问题,请参考以下文章

xml Android - 请求专注于XML格式的EditText(感谢http://stackoverflow.com/a/8077842/273119)

xml Android - 请求专注于XML格式的EditText(感谢http://stackoverflow.com/a/8077842/273119)

xml Android - 请求专注于XML格式的EditText(感谢http://stackoverflow.com/a/8077842/273119)

xml Android - 请求专注于XML格式的EditText(感谢http://stackoverflow.com/a/8077842/273119)

xml Android - 请求专注于XML格式的EditText(感谢http://stackoverflow.com/a/8077842/273119)

xml Android - 请求专注于XML格式的EditText(感谢http://stackoverflow.com/a/8077842/273119)