Datastage - XML Output Stage - Space after tag
Posted: Wed May 16, 2012 2:53 pm
Hello Everyone
I have a process to generate xml feed using XML output stage.
Tags and values are displayed on each line on output file.
Sample data :
<expMonth>
10
</expMonth>
When i run the XML against XSD ( <expMonth> value is required under XSD ), XML Spy throws an error at <expMonth>.
Error is : Value '10' violates 'maxLength' facet value '2'.
Due to space after each tag <expMonth>space and after each value 10 followed by space, XSD is considering the value length as 4 and throwing an error.
I removed 10 and made the data as
<expMonth>
</expMonth>
and ran through XSD, this time it is successfull as two spaces alone made XSD run successfull.
Now how can i remove spaces which are occuring after each tag and after each value in XML?
I have a process to generate xml feed using XML output stage.
Tags and values are displayed on each line on output file.
Sample data :
<expMonth>
10
</expMonth>
When i run the XML against XSD ( <expMonth> value is required under XSD ), XML Spy throws an error at <expMonth>.
Error is : Value '10' violates 'maxLength' facet value '2'.
Due to space after each tag <expMonth>space and after each value 10 followed by space, XSD is considering the value length as 4 and throwing an error.
I removed 10 and made the data as
<expMonth>
</expMonth>
and ran through XSD, this time it is successfull as two spaces alone made XSD run successfull.
Now how can i remove spaces which are occuring after each tag and after each value in XML?