简体   繁体   中英

How to get data from XML feed URL in Java

There is a betting exchange website which offer their data in XML from the following link:

http://odds.smarkets.com/oddsfeed.xml

I would like to access this link to retrieve the latest data (in java). Previously I have had to download the (very large) file and add it to my project and get the data from there. What is the best way to achieve this without having to download the file every time I want to access the data?

I plan on storing the returned data into a database.

Thanks

Well this seems to be very tricky question .I would suggest you to create a simple web service application [Client/server architecture] to get the contents from this url. You can use REST to call this url. But what contents you need to read depends on the functionality that you want to achieve.You need to write your custom logic to read the data.Here in you will be acting as client and the url would be your service.

You can refer following link

https://community.atlassian.com/t5/Confluence-questions/Access-page-content-via-URL/qaq-p/163060

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM