Hello all and thank's for your help
in a very long XML document i need to read content for following lines in powershell
1)
<wd:Address_Data wd:Effective_Date="2015-06-01-07:00" wd:Address_Format_Type="Extended" wd:Formatted_Address="my_adress_XXX
ZZZ
WWW" wd:Defaulted_Business_Site_Address="0">
2)
<wd:Address_Line_Data wd:Type="ADDRESS_LINE_1" wd:Descriptor="Street Name and Type">my_adressXXX</wd:Address_Line_Data>
i've tried many (without success) such as
$o.Adr = $my_XML.SelectNodes('./wd:hierarchy1/wd:hierarchy2/wd:hierarchy3/wd:Address_Data/wd:ID@wd:Formatted_Address]]', $NM).InnerText
or
$o.Adrl1 = $workerJobData.SelectNodes('./wd:hierarchy1/wd:hierarchy2/wd:hierarchy3/wd:Address_Data/wd:ID[@wd:type="ADDRESS_LINE_1" and .Descriptor="Street Name and Type"]]', $NM).InnerText
where NM is the top-level xml node
foreach ($x in $elements.SelectNodes('//wd:WWW', $NM))
regarding 1) i will need to read content whatever Effective_Date
is (use the latest if many)
i'm sure of my path as i already read other "single" entries but i have difficulties adressing "multi-properties inside xml key" such as in my samples
Regards
Emmanuel