Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Is there a way to find an XML page of a site?

RickOShay

New Coder
Hi,

I have an excel tool that will go to a website and fetch a table of data and import it into excel. My problem is that sometimes a website does not have data in a table format. For example, here is a website: https://www.wsj.com/market-data/bonds I want to be able to fetch some data from this site using a macro in excel. Specifically, I want the Consumer Rate data. Is a way to find this page in an XML format that would have this data? I was able to do this for another page (below) that I pull rates form, but I was looking for a way to do it with the WSJ. I can get my excel tool to work with the XML format.

Here is an example of what I was able to do before:
Website Page: https://www.newyorkfed.org/markets/reference-rates/sofr
XML format of the same page: https://markets.newyorkfed.org/read...=25&startPosition=0&sort=postDt:-1&format=xml

Thanks, let me know if my question is not making any sense.
 
Getting the results of a page in XML is not a standard feature of websites in general. The fact that you can pull XML from one site is only because that is something that site specifically added for people using their data.

You'll likely need to parse the HTML of that page to isolate the HTML for the table, then find some way to parse the table contents from HTML into XML or just parse the HTML directly. What programing languages are you using for your site and are you using a CMS? There may be tools already created that can help you with this task.
 
Thanks for the reply. I am actually just using a macro in Excel using some VBS code. The funny thing is I have some data pulling from table 1 from the HTML in the website, but that consumer rate section is not able to be pulled. Is there any way you can think of that I could get this data in HTML or another format?
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom