我有一个xml文件
<BookLib>
<Book Id="1">
<Title>Title1</Title>
<Author>Author1</Author>
<Publisher>Publisher1</Publisher>
<Subject />
</Book>
<Book Id="2">
<Title>Title2</Title>
<Author>Author2</Author>
<Publisher>Publisher2</Publisher>
<Subject />
</Book>
<Book Id="3">
<Title>Title3</Title>
<Author>Author3</Author>
<Publisher>Author3</Publisher>
<Subject />
</Book>
</BookLib>
我想选择书号。我试过用这个
@"/BookLib/Book/Title[contains(translate(text(),'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'" + searchText + "')]/@Id";
在XPathExpression
如何在 c# 中使用 xpath 检索“id”