I am parsing an XML file to java, there is a wrong starting tag in the file. When I run the Code it shows the following error: [Fatal Error] malformed_routes5.xml:9:26: The element type "WrongTag" must be terminated by the matching end-tag "".
<Route>
<FlightNumber>1848</FlightNumber>
<DayOfWeek>Tue</DayOfWeek>
<DepartureTime>13:40</DepartureTime>
<DepartureAirport>Belfast</DepartureAirport>
<DepartureAirportCode>BFS</DepartureAirportCode>
<WrongTag>18:05</ArrivalTime>
<ArrivalAirport>Tenerife-Sur</ArrivalAirport>
<ArrivalAirportCode>TFS</ArrivalAirportCode>
<Duration>PT4H25M</Duration>
</Route>
this is the file which contains the wrong tag, do i need to add a specific exception in the catch for this kind of error?
catch (ParserConfigurationException | SAXException | IOException | IllegalArgumentException ioe) {
throw new DataLoadingException(ioe);
//** check the fatal error " The element type "WrongTag" must be terminated by the matching end-tag "</WrongTag>". "
// ************************************************
}