Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

REST XML client: how to convert http entity to a xml domdocument  RSS feed

 
daniele licitra
Ranch Hand
Posts: 81
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all.

I receve a response from a REST clientin xml format.

There is a clean and simple way to convert org.​apache.​http.HttpEntity to a org.w3c.dom.Document ?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can get an InputStream to read the body via getContent(). Then you'd pass that to the DocumentBuilder.parse method.
 
daniele licitra
Ranch Hand
Posts: 81
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:You can get an InputStream to read the body via getContent(). Then you'd pass that to the DocumentBuilder.parse method.


solved, thanks for yuor help.

This is the code
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!