I have been trying to get my head around that but haven't had much success.
Basically, I need to make a request to some resource on the web and manipulate its response (an xml file).
Here is some sample code. Once I have built the Document object I am not sure how to extract the values I need.
Using java Syntax Highlighting
- DefaultHttpClient httpClient = new DefaultHttpClient();
- HttpPost httpPost = new HttpPost("some URL);
- HttpResponse response = httpClient.execute(httpPost);
- HttpEntity entity = response.getEntity();
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- DocumentBuilder db = dbf.newDocumentBuilder();
- Document doc = db.parse(entity.getContent());
- doc.getDocumentElement().normalize();
- // Here I'd like to do smth with my XML.
Parsed in 0.030 seconds, using GeSHi 1.0.8.4
Thanks.

