How to acces the string inside XML cdata in android -


i trying make android app reads online xml file. xml file includes cdata. , need text inside cdata. how this? in advance!

<id> <![cdata[ 10217 ]]> </id> 

public static string getcharacterdatafromelement(element e) {      nodelist list = e.getchildnodes();     string data;      for(int index = 0; index < list.getlength(); index++){         if(list.item(index) instanceof characterdata){             characterdata child = (characterdata) list.item(index);             data = child.getdata();              if(data != null && data.trim().length() > 0)                 return child.getdata();         }     }     return ""; } 

Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -