The search yields the following match:<person name=joe title=CTO><person name=joe> It does not define all the same attributes found in tag1, but those that it does define match.Because these tags are a match, the tag embedded in tag1 is modified in place to combine the tag from tag1 and the tag from tag2.