Faced such a problem: when you click a button on a site, a post request with the XML type is sent.

How to create this request for Android via JSOUP?

Like HTML POST?

Or is there some kind of pitfalls? I did not find the information on the Internet.

when you press F12 in the moss appears:
POST method, XML type
heders:

 POST /argus/block/send-receive-updates HTTP/1.1 Host: URL User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Referer: URL Content-Length: 752 Cookie: JSESSIONID; ice.sessions=sessionid Connection: keep-alive Pragma: no-cache Cache-Control: no-cache 

and the actual values ​​in the parameters tab:

 ice.submit.partial=true ice.event.target=mainform:queryTree:n-0:j_id145 ice.event.captured=mainform:queryTree:n-0:j_id144 ice.event.type=onclick ice.event.alt=false ice.event.ctrl=false ice.event.shift=false ice.event.meta=false ice.event.x=71 **это судя по всему координаты х,у места нажатия кнопки** ice.event.y=113 ice.event.left=true ice.event.right=false mainform=mainform icefacesCssUpdates javax.faces.ViewState=1 javax.faces.RenderKitId=ICEfacesRenderKit mainform:mainform:queryTree_idta mainform:mainform:queryTree_idtn mainform:j_id137Expanded mainform:j_id137ClickedNodeName mainform:procSearch mainform:_idcl=mainform:queryTree:n-0:j_id144 ice.session=TVi-cz23Of9XMYp0dwMjcw **не знаю откуда это берется** ice.view=1 ice.focus=mainform:queryTree:n-0:j_id144 rand=0.7699530793865863 **и это тоже** 
  • jsoup is the same for parsing web pages library. - Android Android
  • @ Android Android well I used it) after pressing this button an html table appears, which I need to parse - Alex
  • post method, type xml - Alex
  • And, everything, understood. Presumably) - Android Android
  • That is, in theory, it is necessary to simulate a click of this button, and only then parse? - Android Android

1 answer 1

Problem solved!
On the original stack I was told that JSOUP is not suitable for processing javascript
Therefore, I decided to use WebView