I've run into an issue with parsing XML. I have the following structure wherein <Exposures></Exposures> is always present but may be empty if no units were exposed.
<Exposures></Exposures>
If units were exposed then <Exposures> becomes a 1:M array.
<Exposures>
<Exposure>
<ExposureUnit></ExposureUnit>
<ExposureUser>
<ExposureUserID></ExposureUserID>
<ExposureUserName></ExposureUserName>
</ExposureUser>
<ExposureText></ExposureText>
<Exposure_Dttm></Exposure_Dttm>
</Exposure>
<Exposure>
<ExposureUnit></ExposureUnit>
<ExposureUser>
<ExposureUserID></ExposureUserID>
<ExposureUserName></ExposureUserName>
</ExposureUser>
<ExposureUser>
<ExposureUserID></ExposureUserID>
<ExposureUserName></ExposureUserName>
</ExposureUser>
<ExposureText></ExposureText>
<Exposure_Dttm></Exposure_Dttm>
</Exposure>
<Exposure>
<ExposureUnit></ExposureUnit>
<ExposureUser>
<ExposureUserID></ExposureUserID>
<ExposureUserName></ExposureUserName>
</ExposureUser>
<ExposureUser>
<ExposureUserID></ExposureUserID>
<ExposureUserName></ExposureUserName>
</ExposureUser>
<ExposureText></ExposureText>
<Exposure_Dttm></Exposure_Dttm>
</Exposure>
<Exposure>
<ExposureUnit></ExposureUnit>
<ExposureUser>
<ExposureUserID></ExposureUserID>
<ExposureUserName></ExposureUserName>
</ExposureUser>
<ExposureUser>
<ExposureUserID></ExposureUserID>
<ExposureUserName></ExposureUserName>
</ExposureUser>
<ExposureText></ExposureText>
<Exposure_Dttm></Exposure_Dttm>
</Exposure>
<Exposure>
<ExposureUnit></ExposureUnit>
<ExposureUser>
<ExposureUserID></ExposureUserID>
<ExposureUserName></ExposureUserName>
</ExposureUser>
<ExposureUser>
<ExposureUserID></ExposureUserID>
<ExposureUserName></ExposureUserName>
</ExposureUser>
<ExposureText></ExposureText>
<Exposure_Dttm></Exposure_Dttm>
</Exposure>
</Exposures>
In GeoEvent Server how to handle the conditional existence of an element? In pseudocode, I need to examine the XML to determine if the element is present and then terminate or do something else (e.g., field splitter, multi-cardinal field splitter) to handle the rest.
I've tried using Choice and Filter but haven't cracked it. I appreciate any insight that someone may provide.