Marcel Müller
2016-06-07 16:21:07 UTC
Hi.
Objective:
a) Get an HTML-page and store it's content into a variable
b) Navigate within the object by elements
Is:
$var = invoke-webrequest www.somepage.html
Use $var.innertext for parsing
My question is: Is there a way to get the HTML-content (so far I tried
using "wget.exe -O filename.html" and "$var = get-content
filename.html"), store it in a variable and still navigate it by it's
elements? I tried this today and only ended up with a big chunk of
unstructured text in my variable, which isn't easy to work with (it's
not an object, it's plain text, of course)
Is there a way to achieve what I want? There might be something in .Net
that could be usefule, maybe?
Objective:
a) Get an HTML-page and store it's content into a variable
b) Navigate within the object by elements
Is:
$var = invoke-webrequest www.somepage.html
Use $var.innertext for parsing
My question is: Is there a way to get the HTML-content (so far I tried
using "wget.exe -O filename.html" and "$var = get-content
filename.html"), store it in a variable and still navigate it by it's
elements? I tried this today and only ended up with a big chunk of
unstructured text in my variable, which isn't easy to work with (it's
not an object, it's plain text, of course)
Is there a way to achieve what I want? There might be something in .Net
that could be usefule, maybe?
--
Marcel
Marcel