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?
Datastage - XML Output Stage - Space after tag
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 296
- Joined: Sun Nov 16, 2008 7:41 pm
shut off all formatting. The xml should go out as one big giant string, which is what you want anyway....it saves bytes on the wire or wherever else you might be sending the xml.
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
-
- Premium Member
- Posts: 296
- Joined: Sun Nov 16, 2008 7:41 pm
Glad it worked.....it's very odd though, that it failed...CRLFs and blanks are "noise" for XML...and most valid parsers should ignore them.....
Either way, the removal of formatting is a best practice that everyone should follow, and it has been well documented in this forum.
Ernie
Either way, the removal of formatting is a best practice that everyone should follow, and it has been well documented in this forum.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>