Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid 4.0 ice cream sandwich Parser Errors
    primarykey
    data
    text
    <p>I have made a application which reads information from an Api.</p> <p>Link : <a href="http://api.amp.active.com/camping/campground/details?contractCode=CO&amp;parkId=50032&amp;api_key=2chxq68efd4azrpygt5hh2qu" rel="nofollow">http://api.amp.active.com/camping/campground/details?contractCode=CO&amp;parkId=50032&amp;api_key=2chxq68efd4azrpygt5hh2qu</a></p> <p>Following is my code :</p> <pre><code>NodeList list = element.getElementsByTagName("detailDescription"); Log.i("ZealDeveloper","I M In detail "+list.getLength()); if(list != null &amp;&amp; list.getLength() &gt; 0){ for(int i = 0; i &lt; list.getLength(); i++){ entry = (Element) list.item(i); description = entry.getAttribute("description"); drivingDirection = entry.getAttribute("drivingDirection"); latitude=entry.getAttribute("latitude"); longitude=entry.getAttribute("longitude"); } } NodeList list1 = element.getElementsByTagName("amenity"); Log.i("ZealDeveloper","I M In 2 "+list1.getLength()); if(list1 != null &amp;&amp; list1.getLength() &gt; 0){ for(int i = 0; i &lt; list1.getLength(); i++){ entry = (Element) list1.item(i); nameAmenity = entry.getAttribute("name"); listAmenity.add(nameAmenity); } arrAmenity = listAmenity.toArray(new String[listAmenity.size()]); StringBuilder builder = new StringBuilder(); for ( int i = 0; i &lt; arrAmenity.length; i++ ){ builder.append(arrAmenity[i]+"\n"); } txtAmenity.setText(builder); } </code></pre> # <p>I am Getting <code>list.getLength()</code> as <code>0</code>(was getting <code>1</code> in pervious versions of android) , so the parser this condition. For amenity tag i m getting the desired list size.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload