xpath - XQuery: Getting multiple attribute values -
so i'm trying access country codes of following, no luck:
<river id="river-rhone" country="f ch"> <name>rhone</name> <located country="f" /> <located country="ch"/> </river> is there way them? tried access them index nothing works. appreciated!
it seems want /located/@country output:
xquery:
let $xml := <river id="river-rhone" country="f ch"> <name>rhone</name> <located country="f" /> <located country="ch"/> </river> $country in $xml//located/@country return <p>{data($country)}</p> output:
<p>f</p> <p>ch</p>
Comments
Post a Comment