Forum Discussion

WESTECH_Medical's avatar
WESTECH_Medical
Occasional Visitor
10 years ago

How do I run an assertion on an optional XML attribute?

For example:
In the string below either prefix="" or suffix="" will appear in the response message depending on whether that field is populated.
In this case prefix="" is populated.

<parameter name="name" xsi:type="dss:PersonNameType" prefix="Mr" given="Michael" family="Ekaireb"/>


How do I write an assertion for an attribute that is optional? prefix disappears and suffix is now included in the response

 

Thanks,

Mark