Reputation: 17701
I have this type of XML -
<leadareas>
<pho>
<phoName>NWPHO</phoName>
<csName>nw_btn</csName>
<phoTit1>Drugs</phoTit1>
<phoTit2>Sexual Health</phoTit2>
<phoTit3>Violence</phoTit3>
<phoTit4>Alcohol</phoTit4>
</pho>
<pho>
<csName>ne_btn</csName>
<phoName>NEPHO</phoName>
<phoTit1>ne1</phoTit1>
<phoTit2>Something else</phoTit2>
<phoTit3>another</phoTit3>
</pho>
</leadareas>
I would like to write a function where for example phoTit1 is returned where csname = ne_btn, but dont know if this is possible? Any ideas please?
Upvotes: 1
Views: 271
Reputation: 17701
I've sussed it out if anyone's interested!
var nodeRec:XML =navData.pho.(csname =="ne_btn")
return nodeRec.phoTit1
Upvotes: 4