Associate
hey guys,
I have a xml file which has loads of data in it. I need to read though the file and grab all the strings that fall between two known nodes.
example structer;
if i can get everything between '<Message Date' and '</Message>' into a variable so i end up with a load of variables, I'd be really happy
any ideas?
I have a feeling awk is what i need to use but i have no idea how!
thanks
I have a xml file which has loads of data in it. I need to read though the file and grab all the strings that fall between two known nodes.
example structer;
Code:
<Message Date="22/02/2011" Time="14:31:15" DateTime="2011-02-22T14:31:15.817Z" SessionID="1">
<From>
<User FriendlyName="[email protected]"/>
</From>
<To>
<User FriendlyName="[email protected] (E-mail Address Not Verified)"/>
</To>
<Text Style="font-family:Segoe UI; color:#000000; ">
message text
</Text>
</Message>
<Message Date="22/02/2011" Time="14:47:02" DateTime="2011-02-22T14:47:02.019Z" SessionID="2">
<From>
<User FriendlyName="[email protected]"/>
</From>
<To>
<User FriendlyName="[email protected] (E-mail Address Not Verified)"/>
</To>
<Text Style="font-family:Segoe UI; color:#000000; ">
message text.....
</Text>
</Message>
if i can get everything between '<Message Date' and '</Message>' into a variable so i end up with a load of variables, I'd be really happy
any ideas?
I have a feeling awk is what i need to use but i have no idea how!
thanks