How to extract empty vale from XML schema

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
rohit_mca2003
Participant
Posts: 41
Joined: Wed Oct 08, 2008 9:19 am

How to extract empty vale from XML schema

Post by rohit_mca2003 »

Hi,

I have input as follows (2 records) in XML file:

<mandatory>true</mandatory>
<subsection></subsection>
<question>XYZ</question>
<currentQuestion>false</currentQuestion>

<mandatory>true</mandatory>
<subsection>123</subsection>
<question>ABCD </question>
<Question>false</Question>


When I am extracting the values using XML input stage into dataset it gives me following result:

question subsection
-----------------------------
XYZ <subsection></subsection><subsection>123</subsection>
ABCD <subsection></subsection><subsection>123</subsection>

However I want result in following format:

question subsection
-----------------------------
XYZ NULL/Space
ABCD 123


Could any one help me please. Thanx in advance!!

Regards,
kittu.raja
Premium Member
Premium Member
Posts: 175
Joined: Tue Oct 14, 2008 1:48 pm

Re: How to extract empty vale from XML schema

Post by kittu.raja »

Hi,

I think you missed the text in the description. Type text() in the column description then you will get the correct result
Rajesh Kumar
Post Reply