开发者

unable to get full video URL from sax xml parsing in android app

开发者 https://www.devze.com 2023-02-15 00:26 出处:网络
As I am new to Android development, I have used SAX xml parsing in my Android app. It is working fine but in URL when it got \"&\" symbol it simply discard the next all url part.

As I am new to Android development, I have used SAX xml parsing in my Android app. It is working fine but in URL when it got "&" symbol it simply discard the next all url part. I think not sure is this problem of charcaters method of that DefaultHandler class?

public void characters(char[] ch, int start, int length)throws SAXException {

        if (currentElement) 
        {

            currentValue = new String(ch, start, l开发者_C百科ength);
                    currentElement = false;

        }
}   

thanks for the help.


Replace "&" characters in you XML with escape sequences. XML file shouldn't contain "&" characters out of CDATA fields.

0

精彩评论

暂无评论...
验证码 换一张
取 消