如何选择具有唯一 ID 的特定节点并将整个节点返回为 xml。
<xml>
<library>
<book id='1'>
<title>firstTitle</title>
<author>firstAuthor</author>
</book>
<book id='2'>
<title>secondTitle</title>
<author>secondAuthor</author>
</book>
<book id='3'>
<title>thirdTitle</title>
<author>thirdAuthor</author>
</book>
</library>
</xml>
在这种情况下,我想返回 id='3' 的书,所以它看起来像这样:
<book id='3'>
<title>thirdTitle</title>
<author>thirdAuthor</author>
</book>