I`m trying to select one node, by string value of another node.
My Xml part:
<XIP xmlns="http://prty/XIP/v6.0">
<Generation>
<Properties>
<Property>
<PUID>prp/10008</PUID>
<PropertyName>Number Of Audio Streams</PropertyName>
<Value>1</Value>
</Property>
<Property>
<PUID>prp/12</PUID>
<PropertyName>Sampling Frequency</PropertyName>
<Value>48000</Value>
</Property>
<Property>
<PUID>prp/10002</PUID>
<PropertyName>Duration</PropertyName>
<Value>2M9.686S</Value>
</Property>
<Properties>
<Generation>
</XIP>
So, the idea is get 2M9.686S, by string Duration
$xmlDocument.XIP.Generation.Properties.Property.Value | Where-Object $xmlDocument.XIP.Generation.Properties.Property -Property PropertyName -Like ("Duration")
I'm trying for different ways, but don't return any value. What am i doing wrong?
Thanks for any help.