I want to convert my XML document but not sure whether the desired output can be obtained using XSLT. Below is my XML code:
<GetInvoiceList>
<Request>
<Case>
<id>Case_1</id>
<CaseID>Hi</CaseID>
</Case>
<BillStatusCode>
<BillStatusCode>type description</BillStatusCode>
<typecode>1</typecode>
</BillStatusCode>
<EBillProcessStatusCode>
<EBillProcessStatusCode>type description</EBillProcessStatusCode>
<typecode>2</typecode>
</EBillProcessStatusCode>
</Request>
</GetInvoiceList>
I want to convert it into this:
<GetInvoiceList>
<Request>
<Case id="Case_1">
<CaseID>Hi</CaseID>
</Case>
<BillStatusCode typecode="1">type description</BillStatusCode>
<EBillProcessStatusCode typecode="2">type description</EBillProcessStatusCode>
</Request>
</GetInvoiceList>
Is it possible to get the desired output? Would appreciate any help regarding this. Thanks!
idbecome an attribute onCase, for example, but notCaseID. Similarly, why doestypecodebecome an attribute, butBillStatusCodebecomes a text node? Thank you.