Xml tag instead of empty value

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
malin666
Participant
Posts: 19
Joined: Wed Jan 18, 2006 10:16 am

Xml tag instead of empty value

Post by malin666 »

Hi,
I am reading xml file

Folder --> XML Input --> Transformer --> Sequential File

At the end for fields (which are empty in source xml file) in targert txt file I am getting xml tag (for instance <firstName/>) instead of empty value.

Any idea how to get rid of such feature?

Regards
Marcin
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Hi,

Since you are using Transformer stage next to XML INPUT, i guess you would be in the positon to eliminate this.

Try this post. It might help you.

-Kumar
malin666
Participant
Posts: 19
Joined: Wed Jan 18, 2006 10:16 am

Post by malin666 »

kumar_s wrote:Hi,

Since you are using Transformer stage next to XML INPUT, i guess you would be in the positon to eliminate this.

Try this post. It might help you.

-Kumar
I don't think that it is the best solution to use basic function for each tag.

The problems is:
- I have well formed source xml
- some of the tags are empty and represented as <tag/> for example <firstName/>
- in target file after transformation, instead of having empty values I have the tag itself..

Thanks
Marcin
shawn_ramsey
Participant
Posts: 145
Joined: Fri May 02, 2003 9:59 am
Location: Seattle, Washington. USA

Post by shawn_ramsey »

Sounds like a bug to me. Have you contacted support?
Shawn Ramsey

"It is a mistake to think you can solve any major problems just with potatoes."
-- Douglas Adams
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:? Can't you use one of the Transformation Settings on the Output tab to 'Replace empty values with NULLs'? Seem to recall something like that in the stage...
-craig

"You can never have too many knives" -- Logan Nine Fingers
malin666
Participant
Posts: 19
Joined: Wed Jan 18, 2006 10:16 am

Post by malin666 »

chulett wrote::? Can't you use one of the Transformation Settings on the Output tab to 'Replace empty values with NULLs'? Seem to recall something like that in the stage...
I've tried it before. It doesn't help...
MaheshKumar Sugunaraj
Participant
Posts: 84
Joined: Thu Dec 04, 2003 9:55 pm

Post by MaheshKumar Sugunaraj »

Could pls check the Meta data of the XML, I had the same problem, so I actually re-imported using the XML Metadata importer and it worked fine.

With Regards
M
malin666
Participant
Posts: 19
Joined: Wed Jan 18, 2006 10:16 am

Post by malin666 »

MaheshKumar Sugunaraj wrote:Could pls check the Meta data of the XML, I had the same problem, so I actually re-imported using the XML Metadata importer and it worked fine.

With Regards
M
Problem with import indeed. Needed to mark those fields as a text.
Thanks for help
diamondabhi
Premium Member
Premium Member
Posts: 108
Joined: Sat Feb 05, 2005 6:52 pm
Location: US

Post by diamondabhi »

Malin666,
Check your column descriptions, do you have /text() at the end of the column description.

Abhi.
Post Reply