EDN Admin
Well-known member
Hi All,
I wanna add a bogus root element to a xml file using XMLT file.
My original file looks like this;
<pre class="prettyprint <?xml version="1.0" encoding="utf-8" ?>
- <ResponseFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SchemaVersion="2.0" ProcessingDate="2011-12-08" FileProcessingStatusCode="0" FileProcessingMessageText="The file with 336 loan(s) has been processed. There were 164 loan(s) with errors.0 loan(s) had warnings." NumberOfRecords="336" xmlns="https://www.hmpadmin.com/schemas
<Response TypeCode="15" Number="90xxx187" ServicerNumber="001xxx7522" StatusCode="0" />
- <Response TypeCode="15" Number="902xxx187" ServicerNumber="001xxx9884" StatusCode="1
<ErrorDetail AttributeName="ShortSaleDeedInLieuReasonDate" AttributeValue="7/1/2010" ErrorMessage="Error:[HAFLIR-70]" />
</Response>
<Response TypeCode="15" Number="902xxx187" ServicerNumber="012xxx1929" StatusCode="0" />
- <Response TypeCode="15" Number="902xxx187" ServicerNumber="012xxx6965" StatusCode="1
<ErrorDetail AttributeName="TransactionClosingDate" AttributeValue="12/27/2010" ErrorMessage="Error:[HAFLIR-98]" />
</Response>
</ResponseFile>[/code]
The output xml file should look like this;<br/>
<pre class="prettyprint <?xml version="1.0" encoding="utf-8" ?>
- <ROOT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema
<ResponseFile SchemaVersion="2.0" ProcessingDate="2011-12-08" FileProcessingStatusCode="0" FileProcessingMessageText="The file with 336 loan(s) has been processed. " NumberOfRecords="0
<Response TypeCode="15" Number="90xxx187" ServicerNumber="001xxx7522" StatusCode="0" />
- <Response TypeCode="15" Number="902xxx187" ServicerNumber="001xxx9884" StatusCode="1
<ErrorDetail AttributeName="ShortSaleDeedInLieuReasonDate" AttributeValue="7/1/2010" ErrorMessage="Error:[HAFLIR-70]" />
</Response>
<Response TypeCode="15" Number="902xxx187" ServicerNumber="012xxx1929" StatusCode="0" />
- <Response TypeCode="15" Number="902xxx187" ServicerNumber="012xxx6965" StatusCode="1
<ErrorDetail AttributeName="TransactionClosingDate" AttributeValue="12/27/2010" ErrorMessage="Error:[HAFLIR-98]" />
</Response>
</ResponseFile>
</ROOT>[/code]
Can anyone tell me how to write the XMLT file for this please?
Thanks
Nishan
<hr class="sig shamen
View the full article
I wanna add a bogus root element to a xml file using XMLT file.
My original file looks like this;
<pre class="prettyprint <?xml version="1.0" encoding="utf-8" ?>
- <ResponseFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SchemaVersion="2.0" ProcessingDate="2011-12-08" FileProcessingStatusCode="0" FileProcessingMessageText="The file with 336 loan(s) has been processed. There were 164 loan(s) with errors.0 loan(s) had warnings." NumberOfRecords="336" xmlns="https://www.hmpadmin.com/schemas
<Response TypeCode="15" Number="90xxx187" ServicerNumber="001xxx7522" StatusCode="0" />
- <Response TypeCode="15" Number="902xxx187" ServicerNumber="001xxx9884" StatusCode="1
<ErrorDetail AttributeName="ShortSaleDeedInLieuReasonDate" AttributeValue="7/1/2010" ErrorMessage="Error:[HAFLIR-70]" />
</Response>
<Response TypeCode="15" Number="902xxx187" ServicerNumber="012xxx1929" StatusCode="0" />
- <Response TypeCode="15" Number="902xxx187" ServicerNumber="012xxx6965" StatusCode="1
<ErrorDetail AttributeName="TransactionClosingDate" AttributeValue="12/27/2010" ErrorMessage="Error:[HAFLIR-98]" />
</Response>
</ResponseFile>[/code]
The output xml file should look like this;<br/>
<pre class="prettyprint <?xml version="1.0" encoding="utf-8" ?>
- <ROOT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema
<ResponseFile SchemaVersion="2.0" ProcessingDate="2011-12-08" FileProcessingStatusCode="0" FileProcessingMessageText="The file with 336 loan(s) has been processed. " NumberOfRecords="0
<Response TypeCode="15" Number="90xxx187" ServicerNumber="001xxx7522" StatusCode="0" />
- <Response TypeCode="15" Number="902xxx187" ServicerNumber="001xxx9884" StatusCode="1
<ErrorDetail AttributeName="ShortSaleDeedInLieuReasonDate" AttributeValue="7/1/2010" ErrorMessage="Error:[HAFLIR-70]" />
</Response>
<Response TypeCode="15" Number="902xxx187" ServicerNumber="012xxx1929" StatusCode="0" />
- <Response TypeCode="15" Number="902xxx187" ServicerNumber="012xxx6965" StatusCode="1
<ErrorDetail AttributeName="TransactionClosingDate" AttributeValue="12/27/2010" ErrorMessage="Error:[HAFLIR-98]" />
</Response>
</ResponseFile>
</ROOT>[/code]
Can anyone tell me how to write the XMLT file for this please?
Thanks
Nishan
<hr class="sig shamen
View the full article