My input xml:
<?xml version = "1.0" encoding = "UTF-8"?>
<InfoReturn>
<LicenseInfo>
<licenseType>1</licenseType>
<licenseTypeDescAr>دائمة</licenseTypeDescAr>
<licenseTypeDescEn>Permanent</licenseTypeDescEn>
<centerId>1</centerId>
<centerNameA>مرور ديرة</centerNameA>
<centerNameE>TRAFFIC DEIRA</centerNameE>
<interimExpiryDate>2018-09-30T00:00:00.000Z</interimExpiryDate>
<licenseStatusArabic>مع المالك</licenseStatusArabic>
<licenseStatusEnglish>With Owner</licenseStatusEnglish>
<hasEyeTest>0</hasEyeTest>
<personId>1004257701</personId>
<isSpecialExpiryDesA>لا</isSpecialExpiryDesA>
<isSpecialExpiryDesE>NO</isSpecialExpiryDesE>
</LicenseInfo>
</InfoReturn>
Allowed fields will be passed as centerId | centerNameE | personId
The output XML which I am looking for is:
<?xml version = "1.0" encoding = "UTF-8"?>
<InfoReturn>
<LicenseInfo>
<centerId>1</centerId>
<centerNameE>TRAFFIC DEIRA</centerNameE>
<personId>1004257701</personId>
</LicenseInfo>
</InfoReturn>
Please provide XSLT for this solution.