Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

XML Simple transformations - optional Tag

Former Member
0 Kudos

Experts,

Is it possible to make a xml tag as optional ?

EX:

<ACTIVIDADEGROUP>

<tt:loop ref="ACTIVIDADEGROUP">

<ACTIVIDADE>

<ORGANICA tt:value-ref="ORGANICA"/>

<FUNCIONAL tt:value-ref="FUNCIONAL"/>

<PRO_MED tt:value-ref="PRO_MED"/>

<CODACTIVIDADE tt:value-ref="CODACTIVIDADE"/>

<DESIG_ACTIVIDADE tt:value-ref="DESIG_ACTIVIDADE"/>

</ACTIVIDADE>

</tt:loop>

can i make tag "ORGANICA" optional ? i want that if i dont fill any value this tag dont appear in xml output.

Best regards

1 ACCEPTED SOLUTION

Former Member
0 Kudos

In your example:

<ORGANICA tt:value-ref="ORGANICA" minOccurs=0 />

The best place for XML and HTML information is http://www.w3schools.com

2 REPLIES 2

Former Member
0 Kudos

In your example:

<ORGANICA tt:value-ref="ORGANICA" minOccurs=0 />

The best place for XML and HTML information is http://www.w3schools.com

former_member209217
Active Contributor
0 Kudos

Hi Ricardo,

Try using this ST commands.

<tt:cond>,<tt:check>,<tt:skip>

Regards,

Lakshman.