i checked the example in this link but it works for solution other way around , removees the nodes of the ID that i passed on to.
Removing XML Nodes using XSLT?
For example
<Message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dt="example.lessson.1:v3" >
<dt:Header>
<dt:MessageId>12121212121212121</dt:MessageId>
<dt:Timestamp>2013-01-01T00:00:00</dt:Timestamp>
<dt:MessageType>2</dt:MessageType>
</dt:Header>
<dt:Body >
<Rowsets>
<Rowset>
<Row>
<FirstName>Michael</FirstName>
<LastName>David</LastName>
<Phone>1234567890</Phone>
<ID>111111<ID>
</Row>
<Row>
<FirstName>David</FirstName>
<LastName>Michael</LastName>
<Phone>01234567890</Phone>
<ID>222222<ID>
</Row>
<Row>
<FirstName>Yang</FirstName>
<LastName>Christina</LastName>
<Phone>2345678901</Phone>
<ID>333333<ID>
</Row>
<Row>
<FirstName>Grey</FirstName>
<LastName>Meredith</LastName>
<Phone>3456789012</Phone>
<ID>4444444<ID>
</Row>
<Row>
<FirstName>David</FirstName>
<LastName>Shepherd</LastName>
<Phone>5678901234</Phone>
<ID>5555555<ID>
</Row>
</Rowset>
</Rowsets>
</body>
I need to run an XSLt that will use the ID i pass and create a new xml with only that node and header and other body tags retained example if i pass 111111,222222,333333 as the input the output should be
<Message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dt="example.lessson.1:v3" >
<dt:Header>
<dt:MessageId>12121212121212121</dt:MessageId>
<dt:Timestamp>2013-01-01T00:00:00</dt:Timestamp>
<dt:MessageType>2</dt:MessageType>
</dt:Header>
<dt:Body >
<Rowsets>
<Rowset>
<Row>
<FirstName>Michael</FirstName>
<LastName>David</LastName>
<Phone>1234567890</Phone>
<ID>111111<ID>
</Row>
<Row>
<FirstName>David</FirstName>
<LastName>Michael</LastName>
<Phone>01234567890</Phone>
<ID>222222<ID>
</Row>
<Row>
<FirstName>Yang</FirstName>
<LastName>Christina</LastName>
<Phone>2345678901</Phone<ID>333333<ID>
</Row>
</Rowset>
</Rowsets>
</body>