title: Parsing the CDATA section in XML using XML Pull Parser
body: <p>Sample XML</p>
  
  <pre><code>&lt;feed xmlns="http://www.w3.org/2005/Atom"&gt;
      &lt;title&gt;NDTV News - Top Stories&lt;/title&gt;
      &lt;link&gt;http://www.ndtv.com/&lt;/link&gt;
      &lt;description&gt;Latest entries&lt;/description&gt;
      &lt;language&gt;en&lt;/language&gt;
      &lt;pubDate&gt;Wed, 31 Jul 2013 22:33:00 GMT&lt;/pubDate&gt;
      &lt;lastBuildDate&gt;Wed, 31 Jul 2013 22:33:00 GMT&lt;/lastBuildDate&gt;
      &lt;entry&gt;
      &lt;title&gt;Narendra Modi to be BJP's PM candidate, announcement before crucial assembly polls: sources&lt;/title&gt;
      &lt;link&gt;http://feedproxy.google.com/~r/NdtvNews-TopStories/~3/XN7dMIDe5YI/story01.htm&lt;/link&gt;
      &lt;published&gt;Wed, 31 Jul 2013 13:58:31 GMT&lt;/published&gt;
      &lt;author&gt;
      &lt;name&gt;user42715&lt;/name&gt;
      &lt;/author&gt;
      &lt;content type="html"&gt;&lt;![CDATA[&lt;div align="center"&gt;&lt;a href="http://www.ndtv.com/news/images/topstory_thumbnail/  Shatrughan_Sinha_agency_120.jpg"&gt;&lt;img border="0" src="http://www.ndtv.com/news/images/topstory_thumbnail/Shatrughan_Sinha_agency_120.jpg" alt="2013-07-29-08-43-05" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;span style="font-size: large;"&gt;The BJP is likely to anoint Narendra Modi as its prime ministerial candidate for the 2014 elections and make a formal announcement to that effect by September.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt; The BJP is likely to anoint Narendra Modi as its prime ministerial candidate for the 2014 elections and make a formal announcement to that effect by September. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;The BJP is likely to anoint Narendra Modi as its prime ministerial candidate for the 2014 elections and make a formal announcement to that effect by September.   &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;]]&gt;&lt;/content&gt;
     &lt;/entry&gt;
  &lt;/feed&gt;
  </code></pre>
  
  <p>With the below code I was able to retrieve ,  and  values within the  tag. </p>
  
  <pre><code>XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
          private XmlPullParser parser = factory.newPullParser();
          private InputStream urlStream = downloadUrl(urlString);
          parser.setInput(urlStream, null);
          int eventType = parser.getEventType();
          boolean done = false;
  
          while (eventType != XmlPullParser.END_DOCUMENT &amp;&amp; !done) {
              tagName = parser.getName();
  
              switch (eventType) {
              case XmlPullParser.START_DOCUMENT:                  
                  break;
              case XmlPullParser.START_TAG:
                  if (tagName.equals("entry")) {                      
                  }
                  if (tagName.equals("title")) {
                      title = parser.nextText().toString();
                      Log.i(TITLE, title);
                  }
                  if (tagName.equals("published")) {
                      pubDate = parser.nextText().toString();
                      Log.i(PUBLISHEDDATE, pubDate);
                  }
  
                  if (tagName.equals("author")) {
                      readAuthor(parser);
                      Log.i(AUTHOR, author);
                  }
  
                  break;
              case XmlPullParser.END_TAG:
                  if (tagName.equals("feed")) {
                      done = true;
                  } else if (tagName.equals("entry")) {
  
                      rssFeed = new RssFeedStructure(title);
                      rssFeedList.add(rssFeed);
                  }
                  break;
              }
              eventType = parser.next();
          }
  
          private String readAuthor(XmlPullParser parser) throws IOException,
              XmlPullParserException {
              parser.nextTag();
              parser.require(XmlPullParser.START_TAG, null, "name");
              author = parser.nextText().toString();
              parser.require(XmlPullParser.END_TAG, null, "name");
              return author;
          }
  </code></pre>
  
  <p>From the  tag how can I retrieve the "href" value within the  and the text value(The BJP is likely to anoint Narendra Modi.....) from the <p> tag.</p>