给定样本XML:
问题(需要以下XPath表达式): 1.如何检查ExceptionMessage1是否为空。 2.如何检查ExceptionMessage2 @nil == true。 3.如果有ExceptionMessage3,它可以是以下任意一种情况: a.包含异常消息 b.没有消息,带有@nil="true"(结合了ExceptionMessage1和ExceptionMessage2的行为)
<Envelope>
<Body>
<SellResponse>
<SellResult>
<ExceptionMessage1>JourneyManager.SellJourney(segment): Segment already booked under different class of service</ExceptionMessage1>
<ExceptionMessage2 nil="true"/>
<NSProcessTime>0</NSProcessTime>
<ProcessTime>0</ProcessTime>
<Booking nil="true"/>
<Success nil="true"/>
<Warning nil="true"/>
<Error nil="true"/>
<OtherServiceInformations nil="true"/>
</SellResult>
</SellResponse>
</Body>
</Envelope>
TIA