title: XMLResourceParser, I'm not sure how to read the XML that I have
body: <p>Here's an example of my XML file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;assurances&gt;
  &lt;assurance hasReference="true"&gt;
      &lt;message&gt;You're Awesome!&lt;/message&gt;
      &lt;reference&gt;Genesis 1:26&lt;/reference&gt;
  &lt;/assurance&gt;
  &lt;assurance hasReference="true"&gt;
      &lt;message&gt;Your Wonderfull!&lt;/message&gt;
      &lt;reference&gt;Genesis 1:26&lt;/reference&gt;
  &lt;/assurance&gt;
  &lt;/assurances&gt;
  </code></pre>
  
  <p>I'm using code like this to try to retrieve it:</p>
  
  <pre><code>int eventType = -1;
      while(eventType != XmlResourceParser.END_DOCUMENT)
      {
          XmlResourceParser assurances = getResources().getXml(R.xml.assurances); 
          String name = assurances.getText();
          Log.d(TAG, name);
  
          try {
              if (assurances.getEventType() == XmlResourceParser.START_TAG) {
                  String s = assurances.getName();
  
                  if (s.equals("assurance")) {
                      String strMessage = assurances.getAttributeValue(null, "message");
                      String strReference = assurances.getAttributeValue(null, "reference");
  
                      Log.d(TAG, strMessage);
                      Log.d(TAG, strReference);
                  }
              }
          } catch (XmlPullParserException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
      }
  </code></pre>
  
  <p>It's not getting the data and I'm not sure where to go from here.</p>