tXMLMap - "Create empty element"

One Star

tXMLMap - "Create empty element"

Hi,
I have Talend Open Studio for ESB 5.4.1 and i can't achieve the creation of an XML respecting my schema (without empty nodes).
Here's my test job:

In tXMLMap, i set the out column type to Document and i "Import From File" the schema " WorkflowFatturaPAService.xsd and i choose WorkflowFatturaPAResponse:

Note that dotted elements should be optional.
For example the element NotificaPA has the attribute "MinOccurs=0":


In tXMLMap, to test this issue, i only map one tag, i set "Create empty element" to false 

Here's my output:


It doesn't seem to be the correct behaviour, am i missing something?
Thanks,
Marco
Community Manager

Re: tXMLMap - "Create empty element"

Hi
i see each element has a namespace, if you remove the namespace from your XML tree, the empty element will not be created if the  "Create empty element" option is set to false.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tXMLMap - "Create empty element"

Hi 
I think that removing the namespaces will cause validation to fail
Marco
Community Manager

Re: tXMLMap - "Create empty element"

Hi Marco 
I am not sure if it was a bug or not, I have created a jira issue on our bugtracker, let's check with our R&D team.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business