We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi Everyone, I'm a noob and could really use some help with a piece of code I'm trying to write to make my life a little bit easier at work lol. I'm using an array/for loop to do a search on a website and I would like for java to navigate to each search result than pull data from there and store it in a file. There's no id or class in the source code so I can't do anything like variable == document.getElementByClassName("some element").value. This is the website http://www.hipaaspace.com/Medical_Billing/Coding/National_Provider_Identifier/NPI_Number_Lookup.aspx and my script enters any zip code value that the user would input. It assigns that value into the search box than does a .click() on the search button. The search results are stored in an array and a for loop navigates to each result. Once it navigates to the result I need to pull specific data like doctors address / name / phone number etc. I don't want to grab all the text on the site, just some of it. Please help me. I haven't been able to figure out how to do this. There's an option to view the results in a JSON format and I'm not sure how to use that to my advantage. Thank you in advance.
Answers
Window's document global variable exists inside browsers only:
https://developer.Mozilla.org/en-US/docs/Web/API/Window/document
And it is getElementsByClassName(), not getElementByClassName():
https://developer.Mmozilla.org/en-US/docs/Web/API/Document/getElementsByClassName
If you know its URL path or got its ".json" file locally already, you can load it via loadJSONArray() or loadJSONObject():
For ".xml", go w/ loadXML() instead:
https://Processing.org/reference/loadXML_.html
A lot for me to work with, thank you for the reply. I'll get back to you in a week lol