XML '

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
tiozzo
Charter Member
Charter Member
Posts: 38
Joined: Fri Sep 01, 2006 3:07 pm

XML '

Post 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
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

Set data element as XML in you column property.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
prasad111
Premium Member
Premium Member
Posts: 173
Joined: Fri May 19, 2006 10:53 am

Re: XML &apos;

Post by prasad111 »

tiozzo wrote:Hi All, how do I get datastage to output apostrosphe ' instead of &apos; in my XML output. For example I want St john's but data stage is outputting
St John&apos;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.
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Re: XML &apos;

Post 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.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post 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 "&apos;", 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
roblew
Charter Member
Charter Member
Posts: 123
Joined: Mon Mar 27, 2006 7:32 pm
Location: San Ramon

Post 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 "&apos;" text properly, so they want the actual apostrophe character.

Of course, I completely understand and agree with the post above.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As noted above, set the data element to 'XML' for that field and it will pass it through unchanged.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply