Hi
when i am trying to load a simple file into a xml and try to view the file in a visual studio, i run into the following error:
the data is CRLF erroired and looks like
<Tag>
Data
instead of </Tag>Data<Tag/>
Any idea of how to rectify this on PX?
XML CRLF error
Moderators: chulett, rschirm, roy
CRLF's, in a tools that understands xml, are treated as "noise".... so while "pretty" formatting is interesting, it is not required. I'm surprised that studio doesn't recognize it....is the suffix of the file .xml ? This is similar to what you'd see if you opened it in notepad vs IE. DataStage will put some CRLF's in, but why bother...it's only wasted bytes.
<tag>
Data
</tag>
is the same as
<tag>Data</tag>
is the same as
<tag>Data
</tag>
Look at the XML in IE.
Ernie
<tag>
Data
</tag>
is the same as
<tag>Data</tag>
is the same as
<tag>Data
</tag>
Look at the XML in IE.
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>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Maybe it's objecting to CRLF because you're on a UNIX platform and CRLF is not the line terminator. Most XML parsers would still recognize and be able to ignore CRLF, but the one you get with the XML stages has manifested other weird behaviours in the past, so who knows? Can you try pre-processing the file (perhaps with tr) to change all \r\n to just \n?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Turn off / disable the 'Generate formatted output' option. The way that DataStage formats XML output is... let's leave it at 'different'. So turn it off and if for some odd reason your 'end user' still doesn't like it, you'll need to find an external tool that will 'pretty print' it for you before you send it on its way.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Push back. It's legitimate XML, no matter what the "pretty" format is. What are they absorbing it with? Their tool ought to accept it.
Alaternatively, you or they could write a style sheet very easily for display purposes or to do a final revision..... or.....depending on how many tags you have and how large the xml is, you could probably run the string thru a Server transformer and use UV/Basic to remove/add CRLFs where you need them. UV/Basic has some of the best string functions around.
Ernie
Alaternatively, you or they could write a style sheet very easily for display purposes or to do a final revision..... or.....depending on how many tags you have and how large the xml is, you could probably run the string thru a Server transformer and use UV/Basic to remove/add CRLFs where you need them. UV/Basic has some of the best string functions around.
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>
All true. I've had people that didn't *like* the way DataStage formatted the output but they could certainly process it. And the only reason we 'needed' to pretty some was for the people on the other end, not the parser - as noted, it could care less.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers