XML Target - can indents be automatically added?

Situation:

I was wondering if spaces can automatically be added to the Adeptia output when writing the flat file. 

This is what Adeptia is currently producing:

<RESPONSE_GROUP MISMOVersionID="2.4">
<RESPONDING_PARTY _PostalCode="53201" _City="Milwaukee" _State="WI" _StreetAddress="123 E. Test Avenue" _Name="test">
<CONTACT_DETAIL _Name="John Smith">
<CONTACT_POINT _Type="Phone" _Value="866-888-8888 X2365"/>
</CONTACT_DETAIL>
</RESPONDING_PARTY>
<RESPOND_TO_PARTY _Name="Test MORTGAGE, LLC"/>
<RESPONSE ResponseDateTime="2013-08-15T11:04:17">
<RESPONSE_DATA>

 


This is what I would like it to produce  (formating spaces before the tags)

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<RESPONSE_GROUP MISMOVersionID="2.4" >
  <RESPONDING_PARTY _Name="test" _StreetAddress="123 E. Test Avenue" _City="Milwaukee" _State="WI" _PostalCode="53201" >
    <CONTACT_DETAIL _Name="John Smith" >
      <CONTACT_POINT _Type="Phone" _Value="866-888-8888 X2365" ></CONTACT_POINT>
    </CONTACT_DETAIL>
  </RESPONDING_PARTY>
  <RESPOND_TO_PARTY _Name="Test MORTGAGE, LLC" ></RESPOND_TO_PARTY>
  <RESPONSE ResponseDateTime="2013-08-15T11:04:17" >
    <RESPONSE_DATA>

 

Solution:

1. Go to the Advanced Properties of the Data Mapping Activity .

2. On the Mapping XSL tab under Advanced Properties add the property in the XSL definition just after indent as follows :

 

<xsl:output method="xml" version="1.0" encoding="ISO-8859-1" indent="yes" xalan:indent-amount=”2”/>

 

3. Save the Mapping activity and Run the Process Flow.

4. The output generated will be indented .

5. You can increase the indention by increasing the value of property xalan:indent-amount=”2”  as per your requirement .

 

Please make sure that this change is done from Advanced Properties , as it wont be reflected if done from Data Mapper.

Have more questions? Submit a request

0 Comments

Article is closed for comments.