![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | How Powershell parse HTMLDocument? $htmlDoc= New-Object -com "HTMLFILE" $page = "<html><body>this is a test</body></html>" $htmlDoc.write($page) $htmlDoc.close but get Type mismatch exception message in code line : $htmlDoc.write($page) how to avoid this? thanks |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: How Powershell parse HTMLDocument? same time VbScript code can work: vbscript code: set htmlDoc= createobject("HTMLFILE") page = "<html><body>this is a test</body></html>" htmlDoc.write(page) htmlDoc.close |
My System Specs![]() |
| | #3 (permalink) | ||||||||||||
| Guest | Re: How Powershell parse HTMLDocument? On Sep 27, 2:35 pm, "william.w...@xxxxxx" <william.w...@xxxxxx> wrote:
![]() use $htmlDoc |get-member to debug the object method,find a IHTMLDocument2_write method so change the code : $htmlDoc.write($page) to > $htmlDoc.IHTMLDocument2_write($page) the code could work | ||||||||||||
My System Specs![]() | |||||||||||||
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MSXML 4.0 SP2 Parse and SDK | t-4-2 | Vista performance & maintenance | 0 | 07-10-2008 12:29 PM |
| Can Powershell parse email? | akcorr | PowerShell | 4 | 03-26-2008 01:43 PM |
| Parse XML files from Powershell? | Duncan Smith | PowerShell | 8 | 03-21-2007 07:31 AM |
| Using Parse-TextObject | J.Marsch | PowerShell | 6 | 01-19-2007 08:20 AM |
| Parse hyperlinks | Jan Kucera | Avalon | 4 | 11-27-2006 07:56 AM |