1 Reply Latest reply on Jan 20, 2010 6:39 AM by Maurice Zeijen

    Handling missing elements with Smooks

    Mike Velikovich Newbie



      I need to process a message which contains optional elements and transform it to another XML format. An XML is received from an external system and all elements are defined as optional. This means that if a value of the element is null, it will not exist in the file at all. We are using SMOOKS to handle transformations. SMOOKS recommends 2 ways of handling missing variables - one which uses an ! after the variable followed by the default value, and another one which uses <#if> tag and ?? syntax.


      So far none of the above works.


      Do you have any recommendations/examples?


      Thank you in advance,