Page 1 of 1

nillable="true" not working in XML

Posted: Sat Nov 29, 2014 4:43 am
by sarathchandrakt
Hi,

I want to display all null value fields in XML. So what I did is, I modified my .xsd file and updated all fields with nillable="true" option. And my job design is like this,

External Source Stage->XML Stage

In XML Stage, I took Parsing Step and Composing Step. In both Steps, I updated the "document root" with the modified .xsd file. But still i am not able to see my null fields in output XML. Where do you think i am going wrong?

Posted: Sat Nov 29, 2014 8:49 am
by chulett
Perhaps this post will help. Or at least get you started on the right path.

Posted: Sun Nov 30, 2014 11:34 am
by sarathchandrakt
Didn't help really!!! Thank you...

Posted: Mon Dec 01, 2014 12:58 am
by eostic
Please be more explicit about what you are looking for. Usually with external source we are reading xml......and if that is what you are doing, exactly what do you want to see on your resulting relational columns.....

External source and composing is a bit odd.....please describe in detail.

Thanks.

Ernie

Posted: Mon Dec 01, 2014 3:05 am
by sarathchandrakt
Yes I am reading XML file. In the source XML file all NULL columns are hidden. To show the null columns in target XML, i updated the XSD with nillable="true" option for all columns and took it as document root in XML Composer in the XML stage. But still I can't see Null fields in target XML.

Posted: Mon Dec 01, 2014 8:55 pm
by eostic
Sorry...not explicit enough. You say you are "reading" xml, and then later you mention "target XML".

Are you reading xml and writing to a sequential file or database?

Are you reading data from "somewhere" and then writing it into xml?

Are you trying to read xml and write xml in the same Stage?

All are do-able, but each has their complexities and requires more detail for understanding. ...and if you are just getting into xml, do only ONE of these --- don't try to combine the functions (read xml and write it at a single stage) until you fully have the independent functions working and doing what you expect them to.

...and what do you mean by "in the xml file all NULL columns are hidden" ? There is no such setting for "hiding" them. They are either "there", or they are "not there"...and if they are "there", they can be blank or empty, or they might have the "true" attribute setting for nullability.

Sorry --- we want to help, but we need a LOT more detail....especially necessary on the subject of nulls.

Ernie

Posted: Tue Dec 02, 2014 6:07 am
by sarathchandrakt
My Source and target are XML. In source Null values are not shown. In target I should show NULL columns too.