Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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:
0683p000009MBEg.png
In tXMLMap, i set the out column type to Document and i "Import From File" the schema "  WorkflowFatturaPAService.xsd and i choose WorkflowFatturaPAResponse:
0683p000009MBFi.png
Note that dotted elements should be optional.
For example the element NotificaPA has the attribute " MinOccurs=0":
0683p000009MBFP.png

In tXMLMap, to test this issue, i only map one tag, i set "Create empty element" to  false 
0683p000009MBFn.png
Here's my output:
0683p000009MB4Z.png

It doesn't seem to be the correct behaviour, am i missing something?
Thanks,
Marco
Labels (3)
4 Replies
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

Hi 
I think that removing the namespaces will cause validation to fail
Marco
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

IS THIS ISSUE STILL Not solved?

 

I am facing this issue also in Studio 7.2.1

 

Output with "Create Empty Element" Set to False

 

<ns0683p000009MA5A.pngmniChannel>
<ns:WarehouseId/>
</ns0683p000009MA5A.pngmniChannel>