以下は私のXMLの一部です:
<ParentNode>
<NewCommentID>UniqueID02</NewCommentID>
<Comment>
<CommentId>UniqueID01</CommentId>
<CommentDesc>Some comments</CommentDesc>
<CommentTypeCd>Code1</CommentTypeCd>
<CreatedDt>2013-11-29</CreatedDt>
<CreatedByUserId>user01</CreatedByUserId>
<GivenName>Mitchell</GivenName>
<Surname>Johnson</Surname>
</Comment>
<Comment>
<CommentId>UniqueID02</CommentId>
<CommentDesc>Some Comments....</CommentDesc>
<CommentTypeCd>Code2</CommentTypeCd>
<CreatedDt>2013-11-29</CreatedDt>
<CreatedByUserId>user02</CreatedByUserId>
<GivenName>Mike</GivenName>
<Surname>Jobs</Surname>
</Comment>
</ParentNode>
Comment セクションのすべてのノードの詳細を取得したいのですが、どのセクションを選択するかは Node (NewCommentID) によって決まります。上記の例では、'NewCommentID = UniqueID02' の値として、XPathDocument を使用して、CommentID = UniqueID02 である Comment セクションの下にあるすべてのタグとその値を取得します。
誰かがVB.netを使って同じことを達成する方法を教えてもらえますか?