Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

HTML Body Extraction

$
0
0

Hi All,

Ok... so I got Powershell Studio for Christmas (cause I'm a sad geek lol) and I'm loving it. I wrote a program in it using powershell and .net. After fuzzing the stuffing out of it last night, I found an issue. Like a good boy I went to bed and promised to look into the problem today.

Today I awoke early, grabbed some tea and got stuck in...

...and nearly 12 hours later I'm still at it. I think I've googled the google out of google and I can't find an answer. I've tried regXing, I've tried splitting, I've tried offering my computer money.... I won't go on. Needless to say, I've had one of those days. I'm about to head off to bed. Today was my last day off, my brain aches and I have work in the morning!

Before I hit the sack and spend the first hour wondering what went wrong or even worse keeping myself awake by coding in my head (you've all done it too!), I thought I'd post up my problem. Hopefully some of you great guys n girls will leave me a few xmas gifts in the form of resolutions to my problem. So let me explain:

I wrote a program that does stuff. One of it's features is that in response to a given scenario it will pick up an html document on a hard drive and email it to me or another admin. The problem is, some email clients won't display the html email properly (including mine - stupid hotmail). I found a way around this by stripping all but the Body of the document out and then targetting the document. Now I want powershell to do this for me. Hey lets get even simpler... since any html document only has one body, I want powershell to look at any html document I point it towards and import the body, including the body tags.

I thought this would be simple, and probably is for you guys... but the issue has drained me!

Over to you! 

Many thanks and Merry Christmas!


Viewing all articles
Browse latest Browse all 6937

Trending Articles