Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.javascript Subject: Re: Obtaining the DOM tree for a *.htm file on a local disc? Date: Sun, 19 Feb 2023 00:33:59 +0100 Lines: 37 Message-ID: References: <7cb3d7c8-74e8-49d2-ba7d-ab6df813f0c1n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net mAmTAPBD9feMYwbVCVw2uwxFiJAvbk76UwGwaHOA/EsySzpATW Cancel-Lock: sha1:vUMui+JUIPLqze9rv6ST8uGwnDU= Content-Language: de-DE In-Reply-To: <7cb3d7c8-74e8-49d2-ba7d-ab6df813f0c1n@googlegroups.com> Xref: csiph.com comp.lang.javascript:41206 John Stockton, 2023-02-17 00:25: > As feared, MS IE 11 is now not available in Windows 10. I do have a Not, not "as feared" - this is a good thing, since IE is a mess for security. > work-round - I have a Windows XP PC with internet connection removed > and with several older browsers, and I would transfer files via a USB > memory stick. But that's not nearly as convenient as calling IE 11 > from the batch file that I am running. Then call another browser from the batch file. There are many alternatives. > Is there a readily-available function which can be called from > JavaScript running in a normal modern browser which, given as an > argument the name (relative to the current directory, or maybe > absolute) of an HTML file, will return a reference to the parsed DOM > tree of the BODY of the HTML, including the Links, Anchors, etc. > arrays? See . The problem is, that you may not be able to read the existing HTML file into a string for security reasons since JavaScript in a browser is not allowed to read local files on your computer. However using Node.js you may just to that - then you would not even need a browser to do that: -- Arno Welzel https://arnowelzel.de