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

Pass more than one parameter using getElementByTagName

$
0
0

Hi All,

How can I pass two DOM tags looking for the text in both of them so its returned to my file? I'm trying to write the "div" and "p" data to my file. If I have one then it works, why can I not pass two? I'm running version 3. 

 

$domDivs = Invoke-Webrequest "https://www.google.com/finance?q=NYSE%3AAMD&ei=R9KNU7DYB-musQeyhYH4Dg"

$domDivs.ParsedHtml.getElementsByTagName("div","p")| 

Select InnerText | 

Out-File "C:\TestFile.txt"


Viewing all articles
Browse latest Browse all 6937

Trending Articles