XMLPORTS - EXPORTING DATA

I’m creating a XmlPort to Export data, i’d like not to create the tag if related data is empty, i tried to use SKIP method but this skips all tags after the one which i want to skip EXAMPLE data for tag 1 <Tag2> → this is empty data for tag 3 I’D LIKE TO HAVE data for tag 1 data for tag 3 IF I USE SKIP I OBTAIN : data for tag 1 Thanks. Elisa.

I don’t know how to accomplish what you’re asking, but I was curious why you need that? Any program that uses XML will most likely just ignore an empty node anyway.

You’re right, i was just tring to create xml like the old program did, but the old program wrote xml in text mode so it created just the tags needed. Thank you. Elisa.

Hi I had the same problem. It is not possible to omit the <Tag2> line by putting code in the dataport. I think that this is a bug :frowning: I found a workaround that I use to get what I want. Imagine that I have a table called MyTable with fields called Tag1, Tag2 Tag3. I want to export an XML document where Tag2 is omitted if it is blank. I create an XMLPort with 2 dataitems dataitem 1 is MyTable I filter this table so that only records where Tag2 is not blank are selected. I create elements for the dataitem for Tag1, Tag2 and Tag3. dataitem 2 is also MyTable (you have to give it a different name but it is linked to MyTable), this time I filter the table so tha only records where Tag2 is blank are selected. I create elements for this dataitem for Tag1 and Tag3 only. This technique works fine. Its just laborious!