• 'screen'-scraping an html page is quite challenging, because the 'embedded' javascript dynamically changes the page content. You would only succeed by doing what a browser does... and thats a lot.

    Does your embedded application/linux/computer an API that you can tap into?

    From what I understand is that the embedded application/linux/computer is the vehicle to read/collect/save data from your devices, including register/config/control them. The application has a Web interface which you open in a browser and this gives you the user interface to the data and functions.

    ...but luckily it seems to be filled at regular intervals anyway.

    This hints to me that there is some code that runs constantly/triggered on timers to collect the data and stick it into the xml file / update the xml file.

    The Web app - which may just consist of some static html and some javascript - then just reads and presents the content of the xml file. This static html and some javascript is served by some (Apache) Web server. The xml is placed in a spot where the Web server has access to.

    Do you have access to the Linux of this embedded computer? Scout for some apache / httpd / .cfg / ... directory / files. In the (apache/httpd) config you can find out if it is plain html or if other stuff is involved, such as server side logic executed with php modules. Server side logic is used to access files outside of the Web server's accessible directories. By changing the config you can give access to the xml file and pull it with what ever you want, such as Espruino with an XHR, and then do some processing.

    There is xml to json converters in javascript that can run on Espruino to give then javascript object access to the data (trees,collections).

    Javascript has its tricks up the sleeves, but approaching it with an object-oriented mind will get you quickly into some robust useful coding.

About

Avatar for allObjects @allObjects started