# XMLPORTS - EXPORTING DATA

**URL:** <https://www.dynamicsuser.net/t/xmlports-exporting-data/9968>\
**Category:** Developers Forum\
**Created:** [May 17, 2005, 2:06pm UTC](https://www.dynamicsuser.net/t/xmlports-exporting-data/9968 "2005-05-17T14:06:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmacchini](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bmacchini](https://www.dynamicsuser.net/u/bmacchini)\
**Post date:** [May 17, 2005, 2:06pm UTC](https://www.dynamicsuser.net/t/xmlports-exporting-data/9968/1 "2005-05-17T14:06:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![DenSter](https://sea1.discourse-cdn.com/flex023/user_avatar/www.dynamicsuser.net/denster/32/7478_2.png) [@DenSter](https://www.dynamicsuser.net/u/DenSter)\
**Post date:** [May 17, 2005, 7:19pm UTC](https://www.dynamicsuser.net/t/xmlports-exporting-data/9968/2 "2005-05-17T19:19:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bmacchini](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bmacchini](https://www.dynamicsuser.net/u/bmacchini)\
**Post date:** [May 19, 2005, 10:25am UTC](https://www.dynamicsuser.net/t/xmlports-exporting-data/9968/3 "2005-05-19T10:25:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dwest](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@dwest](https://www.dynamicsuser.net/u/dwest)\
**Post date:** [November 4, 2005, 9:11am UTC](https://www.dynamicsuser.net/t/xmlports-exporting-data/9968/4 "2005-11-04T09:11:25Z")

</div>

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 ☹ 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!
