Difficulty Reading XML File
<p>Using Eclipse 3.7.2
Android 2.3.3 / API Level 10</p>

<p>I am having trouble reading an XML file. I "think" I get a proper handle on the file with this code and open it for input / output as I will want to read the info, display for user, then update with any changes.</p>

<p>Coming from the c# world when I goto read the file I see a behavior I am unfamiliar with. In the debug perspective my variables have red square values. Now this may be OK but my first thought is red == trouble? However the data (the data in the variables window of the debug perspective) seems ok so I proceed. My eventType is a zero and I enter into the case statement but then I throw an exception. Now here I drop the ball. I don't know how to get more information about exceptions in Java. For example in the c# world I could get the inner exception. I'm sure there is a way in Java I just haven't learned yet.</p>

<p>Here are the steps:
From line 1 I jump straight to line 9. <kbd>F6</kbd> (Eclipse debug shortcut for "Step over") takes me to line 4, <kbd>F6</kbd> again back to line 9, <kbd>F6</kbd> a final time and  I goto my catch for a generic exception.</p>

<pre><code>  try
  {
      DataFileOut = new FileOutputStream(LiftFile);
      DataFileIn = new FileInputStream(LiftFile);
      InputStreamReader isr = new InputStreamReader(DataFileIn);        

      // auto-detect the encoding from the stream    
      parser.setInput(isr);    
      int eventType = parser.getEventType();    
      Category currentCategory = null;
      boolean done = false;    
      while (eventType != XmlPullParser.END_DOCUMENT &amp;&amp; !done)
      {        
          String name = null;
  0       //eventType = 2;
  1       switch (eventType)
          {
  3         case XmlPullParser.START_DOCUMENT:
  4         break;

            case XmlPullParser.START_TAG:
        ....
       }
  9     eventType = parser.next();
   }
}
</code></pre>

<p>So my thoughts are I have a bad FileInputStream handle or my XML document is not well formed?? Any other thoughts?</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;ExcersiseInformation&gt;
       &lt;Lifts count="6"&gt;
          &lt;Lift&gt;
       &lt;ID&gt;1001001&lt;/ID&gt;
       &lt;Name&gt;Hammer Curls&lt;/Name&gt;
       &lt;PreviousLift&gt;45&lt;/PreviousLift&gt;
       &lt;PreviousReps&gt;8&lt;/PreviousReps&gt;
       &lt;SuggestLift&gt;45&lt;/SuggestLift&gt;
       &lt;SuggestReps&gt;10&lt;/SuggestReps&gt;
       &lt;ActualLift&gt;&lt;/ActualLift&gt;
       &lt;ActualReps&gt;&lt;/ActualReps&gt;
          &lt;/Lift&gt;
          .....
      &lt;/Lifts&gt;
   &lt;/ExcersiseInformation&gt;
</code></pre>
