Java Read XML file Missing Part of Strings

If you use Java StAX api to read xml file, you may have some field missing some part. This post tracks how I solve the problem. The problem is solve by adding the following line of code.

XMLInputFactory inputFactory = XMLInputFactory.newInstance();
//add this line
inputFactory.setProperty("", true);

To read the full solution, go to my previous post about how to read large xml files in Java.

Category >> StAX  
If you want someone to read your code, please put the code inside <pre><code> and </code></pre> tags. For example:
String foo = "bar";