parsing xml in android that contains cdata as tag



hi guys i have xml file something like this



<link>
<![CDATA[
http://ift.tt/1sgeLKy
]]>
</link>


it has big url and its using Cdata and url is showing up its fine till here but i wanna parse it using xmlparser


u an using following code



static final String key_link="link";
XMLParser parser = new XMLParser();
String xml = parser.getXmlFromUrl(URL); // getting XML
Document doc = parser.getDomElement(xml);

here URL is url to xml document

String size=parser.getValue(e,key_link);


but its returning empty . when i replace big link with some other text without cdata i am able to read it with cdata i am not able to red the value in string in client could you please help me out and thanks in advance


No comments:

Post a Comment