Announcement

Collapse
No announcement yet.

Add element to CCDA

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Add element to CCDA

    I need to search for an element in a CCDA message and add it if it's missing. So for example if the elements should like like as shown below:
    First elementSecond ElementThird Element

    I am occasionally not reeving the second element.so IF and only IF the second element is missing then I would need to append it.

    If anyone can help, it would be greatly appreciated.

  • #2
    Without more details it's tough to give a detailed way to do exactly what you're asking for, but here's a basic example of what it sounds like you're looking for:

    Code:
    if(msg.testnodeB.length() == 0){
    	msg.insertChildAfter(msg.testnodeA[0], <testnodeB/>);
    }
    inbound message
    Code:
    <message>
        <testnodeA/>
        <testnodeC/>
    </message>
    outbound message
    Code:
    <message>
        <testnodeA/>
        <testnodeB/>
        <testnodeC/>
    </message>

    Comment

    Working...
    X