I have the following question:
I would like to check, whether a XML document contains a specific XML element. Is it possible to check, for example with a java method of a specific API, which returns a boolean value, wheter a specific XML element are available in a XML document?
This is my XML document as example:
<Test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ServiceRequest>
<RequestPayload>
<LocationInformationRequest>
<InitialInput>
<GeoRestriction>
<Area>
<PolylinePoint>
<Longitude>11.0</Longitude>
<Latitude>12.0</Latitude>
<Altitude>13.0</Altitude>
</PolylinePoint>
</Area>
</GeoRestriction>
</InitialInput>
</LocationInformationRequest>
</RequestPayload>
</ServiceRequest>
</Test>
I need the information as a boolean value, wheter the XML element Area are existing or not existing. The XML Document is used in my own java classes as a type of string.
Thanks for help !