java - parsing xml in android that contains cdata as tag -
i have xml file following:
<link> <![cdata[ https://r16---sn-o097znl7.googlevideo.com/videoplayback?itag=36&expire=1415213271&requiressl=yes&sparams=id%2cinitcwndbps%2cip%2cipbits%2citag%2cmm%2cms%2cmv%2crequiressl%2csource%2cupn%2cexpire&upn=e8gdyxxonr4&signature=7b6d037a1c22dbfb32744c8255bb84578fa32025.ad47e1b35c9ba4b427cb27fe2dbc8b5c68eeb18e&ms=au&mv=m&mt=1415191522&source=youtube&ip=216.12.194.2&initcwndbps=1583750&sver=3&key=yt5&id=o-ap0h2mfabal9n-udz0xto3kc7qhecfl1tc5_allw-odn&fexp=930666%2c932404%2c940240%2c947209%2c947215%2c948124%2c952302%2c952605%2c952901%2c953912%2c957103%2c957201&ipbits=0&mm=31&ratebypass=yes ]]> </link> it contains long url , using cdata. url showing fine until here.
i trying parse using xmlparser. using next 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 url xml document string size=parser.getvalue(e,key_link); it returning empty. when replace long link other text without cdata able read it. cdata not able read value string in client.
how resolve problem?
java android xml
No comments:
Post a Comment