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
精彩评论