RockySteveJobs / android-query

Automatically exported from code.google.com/p/android-query
0 stars 0 forks source link

Aquery XMLDom for utf-8 encoding files always return null result #101

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
While implementing XMLDom of Aquery for utf-8 encoded files,the result always 
comes null.

For example in this url
http://www.bbc.co.uk/nepali/index.xml

When using aquery,the response always comes null.
What steps should I follow to get the appropriate xml file using AQuery.
Thanks in advance

Original issue reported on code.google.com by sanimap@gmail.com on 29 Nov 2012 at 12:48

GoogleCodeExporter commented 8 years ago
I couldn't reproduce it.

The XmlDom is created. Maybe the xml was malformed and it's now fixed with new 
content.

Here's my test case:

    public void testMalformXml(){

        String url = "http://www.bbc.co.uk/nepali/index.xml";

        AjaxCallback<XmlDom> cb = new AjaxCallback<XmlDom>(){
            @Override
            public void callback(String url, XmlDom object, AjaxStatus status) {
                done(url, object, status);
            }
        };
        cb.url(url).type(XmlDom.class);

        aq.ajax(cb);

        waitAsync();

        XmlDom xml = (XmlDom) result;

        assertNotNull(xml);

        AQUtility.debug(xml);

    }

Original comment by tinyeeliu@gmail.com on 30 Nov 2012 at 2:18

GoogleCodeExporter commented 8 years ago

Original comment by tinyeeliu@gmail.com on 30 Nov 2012 at 2:19

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Thanks a lot for the reply.
And you were right ,it was "http://www.bbc.co.uk/nepali/index.xml" issue,rather 
than Aquery issue.
And lastly,the way you have made the XmlDom available on Aquery has made our 
life much easier and thanks a lot for this incredible class.

Original comment by sanimap@gmail.com on 2 Dec 2012 at 8:45