XML : How to parse XML file with "Opening and ending tag mismatch" in Java

I have and XML file with open Price tag. Is there a way to parse the file despite the error? How to skip product with error and continue parsing?

  <Products>        <Product Name="Gummi bears">          <Price Currency="GBP">4.07</Price>          <BestBefore Date="19-02-2014"/>        </Product>        <Product Name="Mounds">          <Price Currency="AUD">5.64          <BestBefore Date="08-04-2014"/>        </Product>        <Product Name="Vodka">          <Price Currency="RUB">70</Price>          <BestBefore Date="11-10-2014"/>        </Product>    </Products>    

No comments:

Post a Comment