LINQを初めて使用しています。 LINQを使用して、特定の値を特定のstringに取得したいと考えています。私は、以下の書式設定を含むXMLドキュメント(files.xml)を持っています。ノード内の指定された文字列値のLINQ検索
<?xml version="1.0" encoding="utf-8" ?>
<DocumentMappings>
<DocumtentCategory>
<CategoryId>001</CategoryId>
<CategoryName>Checksheet and Lists</CategoryName>
<DestinationDocumentLibrary>CheckList and Lists</DestinationDocumentLibrary>
<Multiple>false</Multiple>
</DocumtentCategory>
<DocumtentCategory>
<CategoryId>011</CategoryId>
<CategoryName>Product Information</CategoryName>
<DestinationDocumentLibrary>Product Information</DestinationDocumentLibrary>
<Multiple>true</Multiple>
</DocumtentCategory>
</DocumentMappings>
質問
は、どのように私はLINQを使用して「チェックシートとリスト」の「区分名」の文字列として「DestinationDocumentLibrary」の値を盗んでください。
上記の例では、「チェックシートとリスト」はパラメータ(文字列)として渡され、LINQクエリに動的に渡されます。
質問が明確で、多くのおかげで、
3つすべてがうまく動作しますが、以下のコメントで私が言及した理由で@ Timを選んだ。 – Chin