I am using XMLEventReader for parsing big xml files and it works fine in one project but when I import the same class with the same imports in another project it does not parse the xml well and it gives STAX Event
.
Below is my code:
XMLInputFactory factory = XMLInputFactory.newInstance();
XMLEventReader eventReader = factory.createXMLEventReader(new FileReader(exportedFilePath));
I debugged and inspected the eventReader and in the project where is working is f in property and in the project where does not work there is m.
I can not catch the exception because it is same class and same imports..
Here are the imports:
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.events.Attribute;
import javax.xml.stream.events.Characters;
import javax.xml.stream.events.EndElement;
import javax.xml.stream.events.Namespace;
import javax.xml.stream.events.StartElement;
import javax.xml.stream.events.XMLEvent;