I have a input and desired output xml file , but not able to write generic xsl transformer for that. Can anybody here help me out ? address/billing may have more elements at runtime, which should be directly copied to main person block.
<searchPersonResponse>
<persons>
<person>
<name>name2</name>
<address>
<billing>
<city>xx</city>
<state>yyyy</state>
<zip>zzzzz</zip>
</billing>
</address>
</person>
<person>
<name>name1</name>
<address>
<billing>
<city>xx</city>
<state>yyyy</state>
<zip>zzzzz</zip>
</billing>
</address>
</person>
</persons>
</searchPersonResponse>
desired output xml
<searchPersonResponse>
<persons>
<person>
<name>name2</name>
<city>xx</city>
<state>yyyy</state>
<zip>zzzzz</zip>
</person>
<person>
<name>name1</name>
<city>xx</city>
<state>yyyy</state>
<zip>zzzzz</zip>
</person>
</persons>
</searchPersonResponse>