This week's giveaway is in the JDBC forum.
We're giving away four copies of Java Database Connections & Transactions (e-book only) and have Marco Behler on-line!
See this thread for details.
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

consuming xml and producing json  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends
I'm developing a web app ,in the present sprint i have to consume a rest service (XML format) produced by QuickBuild server ,do some work and send the result to an angularjs client(Json format).
i need some help(no code , no implementation...) just steps the what to do things.

I'll be grateful
cheers
 
Author and all-around good cowpoke
Posts: 13078
6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Step 1 - learn how to use the Java standard library to handle XML documents:
a. parsing to a DOM - document object model
b. extracting desired element data from the DOM

Bill
 
Magiri Mahdi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Arun Kumarr I'm sorry i send a changing name request next time you will see my real name
@ William Brogden thanks for your help but i didn't goes well i couldn't get the xml content produced from the Rest service.
if it was an xml file that would be easy but from a URL i think that it needs a sort of XMLHTTPrequest or something like that , i have to consume the service i hope it's clear .
you will find a snapshot in the attachement
QuickBuild-rest-API.jpg
[Thumbnail for QuickBuild-rest-API.jpg]
xml Rest service
 
Ranch Hand
Posts: 662
Eclipse IDE Java Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. You can consume the xml using the xmlhttp object and do a dom search and get the desired element as William mentioned.
One other thing, I would like you to place a request at the server side team to qualify the element, "com.pmease.quickbuild.model.Configuration" with a more meaningful element name like, "Configuration".
 
Magiri Mahdi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Arun Kumarr i'll try the technique a post a feedback later
 
Arun Kumarr
Ranch Hand
Posts: 662
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cheers for changing the name.
Yes. Do post your feedback. Get back, if you are stuck somewhere.
 
Magiri Mahdi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Arun Kumarr or @William Brogden or @any one else can help ,i need to
1) pass threw a proxy then
2)the server authentication(login and password) then==>how to pass the login and password to the server signin page???
3) get some xml tags and parse them to JSON
i hope it's clear by the way this is the server documentation link if you want to take a look QuickBuild Get all configurations in the system
Thanks
 
Water proof donuts! Eat them while reading this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!