Hi I want to transform my XML with nested elements into flat XML where all nested elements comes in parallel
Input XML :
<?xml version='1.0' encoding='UTF-8'?>
<Report_Data>
<Report_Entry>
<Employee_ID>02159</Employee_ID>
<Name>ABC, DEF</Name>
<Citizenship_Countries>United States of America</Citizenship_Countries>
<National_Identifiers>
<National_ID_Country>United States of America</National_ID_Country>
<National_ID_Type_Name>Social Security Number (SSN)</National_ID_Type_Name>
<National_ID_Unformatted>111111111</National_ID_Unformatted>
</National_Identifiers>
<Marital_Status>Married (United States of America)</Marital_Status>
<Dependents>
<Relationship>Child</Relationship>
<Name>Ethan ABC</Name>
<Age>12</Age>
</Dependents>
<Dependents>
<Relationship>Child</Relationship>
<Name>Holly ABC</Name>
<Age>7</Age>
</Dependents>
</Report_Entry>
<Report_Entry>
<Employee_ID>04805</Employee_ID>
<Name>dUMMY, ABC</Name>
<Citizenship_Countries>United States of America</Citizenship_Countries>
<National_Identifiers>
<National_ID_Country>United States of America</National_ID_Country>
<National_ID_Type_Name>Social Security Number (SSN)</National_ID_Type_Name>
<National_ID_Unformatted>111111111</National_ID_Unformatted>
</National_Identifiers>
<Marital_Status>Married (United States of America)</Marital_Status>
<Dependents>
<Relationship>Child</Relationship>
<Name>QWER dUMMY</Name>
<Age>6</Age>
</Dependents>
<Dependents>
<Relationship>Child</Relationship>
<Name>ASDF dUMMY</Name>
<Age>4</Age>
</Dependents>
</Report_Entry>
</Report_Data>
output XML :
<?xml version='1.0' encoding='UTF-8'?>
<Report_Data>
<Report_Entry>
<Employee_ID>02159</Employee_ID>
<Name>ABC, DEF</Name>
<Citizenship_Countries>United States of America</Citizenship_Countries>
<National_Identifiers_National_ID_Country>United States of America</National_Identifiers_National_ID_Country>
<National_Identifiers_National_ID_Type_Name>Social Security Number (SSN)</National_Identifiers_National_ID_Type_Name>
<National_Identifiers_National_ID_Unformatted>111111111</National_Identifiers_National_ID_Unformatted>
<Marital_Status>Married (United States of America)</Marital_Status>
<Dependent_Relationship>Child</Dependent_Relationship>
<Dependent_Name>Ethan ABC</Dependent_Name>
<Dependent_Age>12</Dependent_Age>
</Report_Entry>
<Report_Entry>
<Employee_ID>02159</Employee_ID>
<Name>ABC, DEF</Name>
<Citizenship_Countries>United States of America</Citizenship_Countries>
<National_Identifiers_National_ID_Country>United States of America</National_Identifiers_National_ID_Country>
<National_Identifiers_National_ID_Type_Name>Social Security Number (SSN)</National_Identifiers_National_ID_Type_Name>
<National_Identifiers_National_ID_Unformatted>111111111</National_Identifiers_National_ID_Unformatted>
<Marital_Status>Married (United States of America)</Marital_Status>
<Dependent_Relationship>Child</Dependent_Relationship>
<Dependent_Name>Holly ABC</Dependent_Name>
<Dependent_Age>7</Dependent_Age>
</Report_Entry>
<Report_Entry>
<Employee_ID>04805</Employee_ID>
<Name>dUMMY, ABC</Name>
<Citizenship_Countries>United States of America</Citizenship_Countries>
<National_Identifiers_National_ID_Country>United States of America</National_Identifiers_National_ID_Country>
<National_Identifiers_National_ID_Type_Name>Social Security Number (SSN)</National_Identifiers_National_ID_Type_Name>
<National_Identifiers_National_ID_Unformatted>111111111</National_Identifiers_National_ID_Unformatted>
<Marital_Status>Married (United States of America)</Marital_Status>
<Dependent_Relationship>Child</Dependent_Relationship>
<Dependent_Name>QWER dUMMY</Dependent_Name>
<Dependent_Age>6</Dependent_Age>
</Report_Entry>
<Report_Entry>
<Employee_ID>04805</Employee_ID>
<Name>dUMMY, ABC</Name>
<Citizenship_Countries>United States of America</Citizenship_Countries>
<National_Identifiers_National_ID_Country>United States of America</National_Identifiers_National_ID_Country>
<National_Identifiers_National_ID_Type_Name>Social Security Number (SSN)</National_Identifiers_National_ID_Type_Name>
<National_Identifiers_National_ID_Unformatted>111111111</National_Identifiers_National_ID_Unformatted>
<Marital_Status>Married (United States of America)</Marital_Status>
<Dependent_Relationship>Child</Dependent_Relationship>
<Dependent_Name>ASDF dUMMY</Dependent_Name>
<Dependent_Age>4</Dependent_Age>
</Report_Entry>
</Report_Data>
Note: My child element is same element with name "Name" under dependent element. So what I want in my output XML is name of dependent Name is to be with different element name like Dependent_Name