Page 1 of 1

XML '

Posted: Thu May 24, 2007 5:30 pm
by tiozzo
Hi All, how do I get datastage to output apostrosphe ' instead of ' in my XML output. For example I want St john's but data stage is outputting
St John's . Is there a way to override it?



Thanks

Posted: Thu May 24, 2007 7:20 pm
by JoshGeorge
Set data element as XML in you column property.

Re: XML '

Posted: Tue May 29, 2007 6:12 pm
by prasad111
tiozzo wrote:Hi All, how do I get datastage to output apostrosphe ' instead of ' in my XML output. For example I want St john's but data stage is outputting
St John's . Is there a way to override it?
Thanks
This looks only in the UNIX environment, when you look in the windows environment with internet explorer it will look fine.
I noticed yours is a windows environment, I guess if you open in Internet explorer it should be fine toooo.

Re: XML '

Posted: Tue May 29, 2007 6:19 pm
by JoshGeorge
This is not about viewing. Real data in the output file is what OP is talking about.
prasad111 wrote: This looks only in the UNIX environment, when you look in the windows environment with internet explorer it will look fine.
I noticed yours is a windows environment, I guess if you open in Internet explorer it should be fine toooo.

Posted: Wed May 30, 2007 9:55 pm
by eostic
Another question would be "why does it matter?". What tool or "thing" is reading the XML? It's perfectly valid (and preferred) to escape quotes in this fashion.

Here is a note directly from the XML specification:

=======
To allow attribute values to contain both single and double quotes, the apostrophe or single-quote character (') may be represented as "'", and the double-quote character (") as """.
=======

It's more flexible, and as noted by prasad111, IE understands it, as should any other tool that claims to understand standard XML content.

Ernie

Posted: Thu Dec 20, 2007 5:44 pm
by roblew
Has anyone figured out how to output the actual apostrophe character to XML using the XML stage? Our target system is not interpretting the "'" text properly, so they want the actual apostrophe character.

Of course, I completely understand and agree with the post above.

Posted: Thu Dec 20, 2007 8:33 pm
by chulett
As noted above, set the data element to 'XML' for that field and it will pass it through unchanged.