开发者

How to use HTTP POST for getting xml parsed response

i am using sax xml parsing for parsing the url but how to use HTTP Post method in my code bcoz in my code i never use HTTP POST or GET method .so how to use HTTP POST for getting web servises parsed response.means pls can you stuff in my code how to use HTTP post method.. my code is below..

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
try {

        String temp = 



        Log.i("temp url..",temp);
        URL sourceUrl = new URL(temp);

        xr.setContentHandler(myXMLHandler);
        xr.parse(new InputSource(sourceUrl.openStream()));

    } 
     catch (Exception e) {
     System.out.println("XML Pasing Excpetion = " + e);
    }
     sitesLis开发者_JAVA技巧t = XMLHandlerfiltersearch.sitesList;
     array_galleryname = new String[sitesList.getLatitude().size()];

} thanks to all responses in adv.

pls answer my question i am waitng pls psl


This is a good answer for both HTTP-POST and SAX PArser

Android: parse XML from string problems

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜