Removing &amp from the output of an XML

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ggarze
Premium Member
Premium Member
Posts: 78
Joined: Tue Oct 11, 2005 9:37 am

Removing &amp from the output of an XML

Post by ggarze »

I'm creating an XML from a SFF file and one of the values inside the XML document needs to read something like "&NAME;". When I put this value in the transformer and then view the ouput xml file it reads something like as "&NAME;" Is there any option in the XML output stage to supress this and have it shows as I intended?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Are you sure you really want to change this? That is standard XML and will "show as intended" when the XML is processed on the receiving end.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ggarze
Premium Member
Premium Member
Posts: 78
Joined: Tue Oct 11, 2005 9:37 am

Post by ggarze »

I thought that was the standard as well. The group that I'm investigating this for said that they have a 3rd party application that the feel will not be able to read this because it's validating the xml against a dtd.

I suggested that if it is a problem that they would have to write something upfront to convert the &amp to & before feeding the 3rd part application because I do not think you can supress that in DataStage
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It *is* the standard and any validator worth its salt would complain finding that character in there untranslated... i.e. not 'safe'. Perhaps it's an issue with using a dtd rather than the more standard xsd for this. [shrug]

Depending on your job design, you can set the 'Data Type' for that field to 'XML' in the stage, that will tell DataStage that it is already XML and to just pass it through unmolested.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ggarze
Premium Member
Premium Member
Posts: 78
Joined: Tue Oct 11, 2005 9:37 am

Post by ggarze »

Worked great Craig Thanks!!!
schwaa
Participant
Posts: 4
Joined: Mon Jun 09, 2008 1:57 pm

Which stage has XML 'Data Type'?

Post by schwaa »

[img][quote="chulett"]It *is* the standard and any validator worth its salt would complain finding that character in there untranslated... i.e. not 'safe'. Perhaps it's an issue with using a dtd rather than the more standard xsd for this. [shrug]

Depending on your job design, you can set the 'Data Type' for that field to 'XML' in the stage, that will tell DataStage that it is already XML and to just pass it through unmolested.[/quote][/img]

Which stage has XML 'Data Type'? I use 8.0. I had to reply to this thread as I couldn't find any other postings elsewhere. Thanks!
Alex
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

XML Output.
-craig

"You can never have too many knives" -- Logan Nine Fingers
schwaa
Participant
Posts: 4
Joined: Mon Jun 09, 2008 1:57 pm

Post by schwaa »

[quote="chulett"]XML Output. ...[/quote]

Thanks! I found it under the 'Data Element' field.
Alex
Post Reply