Focal Point
Writing XML via XML Adapter with Data Migrator -- Can You Print an Empty Field?

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/7817011426

September 14, 2012, 09:38 AM
John_Edwards
Writing XML via XML Adapter with Data Migrator -- Can You Print an Empty Field?
I have an xml spec that specifies a field that is generally empty for our data. So as expected, when I send records to the output file this field doesn't show up in the stream.

My customer wants the field to appear, with no data in it like this:

 <fieldname></fieldname> 


Is there a way to do this with Data Migrator? I've played with the MISSING attribute and putting different comparators in the assignment without seeing any change to the output.

J.

This message has been edited. Last edited by: John_Edwards,



September 18, 2012, 10:48 AM
Clif
There's nothing displayed in the post after "like this:" so I'm guessing that you wrote some XML that the Forum software processed. You may need to use the CODE
</> 
button around it.

Could you also post the xsd that describes the entity.
September 18, 2012, 11:29 AM
John_Edwards
Fixed. Thanks for the tip.



September 19, 2012, 02:00 PM
Clif
I was afraid of that. You had it right the first time, If there is no value for the field we output... nothing.

I talked to the development manager and we could add the functionality you require. So that you get notified when it's done please open a hottrack case.
September 20, 2012, 09:27 AM
John_Edwards
The XSD Element spec has an attribute entitled "nillable" that permits empty fields to appear in the file. The xsd element I'm coding to doesn't specify nillable=true, so as far as I'm concerned their test tool that complains about the element being missing has no credibility. But now that I've complained I'm sure they'll put it in and we'll be back to this same place.

I'll open a case, but I'm leaping to the conclusion this won't be a patch. Upgrade is likely not something that will happen on this site soon.

Thanks for the reply.

J.



September 20, 2012, 09:39 AM
John_Edwards
Opened a case, ticket #82642522