There are messages:
<Employees xmlns="https://services">
<Employee>
<SNILS>111-111-111-1</SNILS>
<Name>Den</Name>
<Sex>M</Sex>
</Employee>
</Employees>
<Employees xmlns="https://services">
<Employee>
<SNILS>111-111-111-2</SNILS>
<Name>Elena</Name>
</Employee>
</Employees>
<Employees xmlns="https://services">
<Employee>
<SNILS>111-111-111-3</SNILS>
<Name>Elena</Name>
<Sex/>
</Employee>
</Employees>
output should be look like this:
<Employees xmlns="https://services">
<Employee>
<SNILS>111-111-111-1</SNILS>
<Name>Den</Name>
<Sex>M</Sex>
</Employee>
</Employees>
<Employees xmlns="https://services">
<Employee>
<SNILS>111-111-111-2</SNILS>
<Name>Elena</Name>
<Sex>W</Sex>
</Employee>
</Employees>
<Employees xmlns="https://services">
<Employee>
<SNILS>111-111-111-3</SNILS>
<Name>Elena</Name>
<Sex>W</Sex>
</Employee>
</Employees>
we must add a new element.
- if it is not there
- if it is not empty
added a block diagram:
put the value I got
<enrich>
<source xpath="get-property('VALUE')"/>
<target xmlns:t="https://services.rosminzdrav.ru/MedStaff" action="replace" type="custom" xpath="//t:Employee/t:Sex"/>
</enrich>
- how to check that the element is not empty?
- how to add a new element?