- $resp = Invoke-WebRequest 'https://go.microsoft.com/fwlink/?LinkID=113397' -UseBasicParsing
-
- $xml = [xml]('<obj>' + ($resp.Content -replace '(?s)^.*?<h2 id="examples">Examples</h2>','' -replace '(?s)<h2 id="parameters">Parameters</h2>.*$','') + '</obj>')
-
- for($i = 0; $i -lt $xml.obj.h3.Count; $i++){
- '------{0}------' -f $xml.obj.h3[$i].innerText
- $xml.obj.pre[$i].InnerText
- }
复制代码
|