Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
tXmlMap has a checkbox item to remove empty tags; but tHMap (returnning from Mapper) doesn't seem to have this option.
What is the best practice case on a returned Document type from the tHMap, to remove empty tags?
Thanks
Hello,
We have redirected your issue to our data mapper expert and then come back to you as soon as possible.
Thank for your time.
Best regards
Sabrina
Hi,
You can set the structure's element to optional in TDM
If you map the structure like
with the input
<?xml version="1.0" ?> <Root> <b> <c>foo</c> </b> <b> <d>bar</d> </b> </Root>
then the output will be also
<?xml version="1.0" ?> <Root> <b> <c>foo</c> </b> <b> <d>bar</d> </b> </Root>
Thanks for the reply; I do see in the structure; when [Read Only] is selected; the Basic section which contains the option of Mandatory (default).
However, I do not see a way to edit this to be Optional (Nullable) on the basic section.
When I switch from [Read Only] to [Editiable] I do not see any selectable choices reflecting 'Mandatory' anymore; or anywhere to pick 'Optional'.
I do see a nullable checkbox; but that doesn't switch it from Mandatory to Optional.
Question 1) so what am I missing to edit this property to be optional?
Also
A second question if you don't mind.
When I load a pre-defined xml structure; if a tag has attributes; then structure tree has Tag/Attribute/attribute tag in the tree format.
However, if I manually add a new tag; set it to be of type Xml Attribute; it does show with the Attribute icon; and shows to be an Attribute; but the word 'Attribute' doesn't appear in the tree structure between it and the root node. Is this ok? Seems odd. Is this ok?
I found the answer to the Mandatory vs Optional; Setting the Occurs to 0 1 did the trick on a non-looping tag.
Still unsure why Attributes is missing from the tree on a added tag/attribute; and if it matters. (screencap above)
Hi,
When an element's 'Visible Group' is unselected, then it will be disappeared
What ultimately allowed me to controller mapper elements and attributes; and designate that they would not show if they do not have data; was to set the Occurs Min/Max "Min" value to 0 for any element or attribute; that could have missing data; and if the data is missing; you want to suppress the tag.
Doing the Visible Group toggle didn't help because while it did remove the element completely; if there was data mapped to that element; it was placed in the xml at that point; without a holding element to hold it; and the xml thereafter failed validation.
Using the Occurs Min = 0 is the trick.
Thanks all for your replies.