XPath - Quering two XML documents
- by Arnej65
I have have two xml docs:
XML1:
<Books>
<Book id="11">
.......
<AuthorName/>
</Book>
......
</Books>
XML2:
<Authors>
<Author>
<BookId>11</BookId>
<AuthorName>Smith</AuthorName>
</Author>
</Authors>
I'm trying to do the following:
Get the value of XML2/Author/AuthorName where XML1/Book/@id equals XML2/Author/BookId.
XML2/Author/AuthorName[../BookId = XML1/Book/@id]