Application Development and Automation 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: 
Read only

XML Simple transformations - optional Tag

Former Member
0 Likes
751

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
Read only

Former Member
0 Likes
463

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
Read only

Former Member
0 Likes
464

In your example:

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

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

Read only

former_member209217
Active Contributor
0 Likes
463

Hi Ricardo,

Try using this ST commands.

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

Regards,

Lakshman.