INTRODUCTION :

If you are familiar with Invoke-WebRequest cmdlet then you must be aware that you get a parsed HTML from the requested Web URL. DOM structure of this Parsed HTML could be utilized to get access to HTML elements of the web page, like in the below animation –

PROBLEM :

What if we have HTML files are locally present on your machine or HTML content in form of string? Do we have any mechanism in place to Parse the local file/string?

SOLUTION :

Well the answer is – yes we can! 🙂

Microsoft provides HTML document class in .Net framework class library, which has a Write() method to write HTML Document using DOM 2 (Document Object Model Level 2)

Read the full article on my new website RidiCurious.com

Book Announcement : PowerShell Scripting Guide to Python

https://leanpub.com/PowerShell-to-Python/embed