Androiddagi WebView-da tahlil qilinmagan ma'lumotlar ko'rsatilmaydi

I am new in android development.Please see the Attached image alsoenter image description here

Ushbu urlni tekshirib ko'ring -

http://mobileecommerce.site247365.com/admin/catdata.xml

Iltimos, tarqatma materialni tekshiring (Cat_name) cat_desc android webview-da to'g'ri ko'rsatilmaydi.

Nima uchun, kimdir menga yordam berishi mumkinmi yoki biron bir fikrga ega bo'lmasligini bilmayman?

Bu mening kodim -

public void startElement(String uri, String localName,String qName, Attributes 
        attributes) throws SAXException {
    currentTag=localName;
    Log.v("in start elelmet", "in start elelmet");
    if(qName.equals("Table")){
        buffer=new StringBuffer();
        itemTagStarted=true;

        item=new NewsItem();
    }

}

@Override
public void characters(char[] ch, int start, int length)
        throws SAXException {
    if(itemTagStarted){
        if(currentTag.equals("Cat_Name")){
            item.setCatname(String.valueOf(ch,start,length));
        }

        if(currentTag.equals("Cat_id")){
            item.setCatid(String.valueOf(ch,start,length));
        }

        if(currentTag.equals("Cat_Desc")){
            buffer.append(String.valueOf(ch,start,length));
        }
    }
}

@Override
public void endElement(String uri, String localName,
        String qName) throws SAXException {
    currentTag="";
    if(qName.equals("Table")){
        itemTagStarted=false;
        newsList.add(item);
    }

    if(qName.equals("Cat_Desc")){
        item.setCatdesc(buffer.toString());
        Log.v("Description data",buffer.toString());
    }
}

@Override
public void endDocument() throws SAXException {
    Log.v("parsing completed","parsing completed : array size : "+newsList.size());
}

});
}
        catch(Exception ex)
        {
            ex.printStackTrace();
        }
0

1 javoblar

Cat_Desc qiymatini o'rnatish uchun WebView # loadDataWithBaseURL (...) foydalanasizmi? Saytni sodda SAXParser bilan sinab ko'rdim, natijada loadDataWithBaseURL ga chiqdi va WebViewda ko'rish mumkin chiqdi.

enter image description here

kerakli teg bilan yangilang

2
qo'shib qo'ydi
Do'stim, mening muammom "Handouts" yorlig'ini ko'rsatishda ... boshqalar mukammal tarzda namoyon bo'lmoqda.
qo'shib qo'ydi muallif mAc, manba
Rahmat, Dude, javobingiz mening kunimni saqlaydi. Rahmat
qo'shib qo'ydi muallif mAc, manba