Reputation: 8171
I have two powershell scripts:
One using a single <b>
element:
$x = [xml] "<a><b>foo</b></a>"
$x.a.b.length
And one using multiple (two in this case) <b>
elements:
$y = [xml] "<a><b>foo</b><b>bar</b></a>"
$y.a.b.length
The first script returns the length of the text in the one <b>
element, the second returns the number of <b>
elements.
How do I find out if there is one or multiple <b>
elements. Clearly the length
property wont do the job.
I'm using win 8.1 and powershell 4
Upvotes: 1
Views: 81