I have modified my code with regular expression but I have problems with fn:tokenize. This is a bit part of my xml file:
<radix>
...
<EV>
<accoppiamenti>
<accoppiamento specie="e01" />
</accoppiamenti>
</EV>
<accoppiamenti>
<accoppiamento specie="e00" />
<accoppiamento specie="e01" />
<accoppiamento specie="e02" />
</accoppiamenti>
</EV>
...
</radix>
This is the part of my file xquery with tokenize:
for $ev in $snapshot/EV
let $stringa := $ev/accoppiamenti//accoppiamento/@specie
return(
fn:tokenize($stringa,"e")
)
The expected output is 01 00 01 02 but the effective output is 0100 (without space).
What's the trouble? Thanks at all for the helps.
01000102- Local Hero$stringa[1]for e01,$stringa[2]for e00 etc. Now I must cycle from the element $string[4] to the element $string[last()-3]. How can I do? Is there a cycleforin C style? - Local Hero