Hi all,
I'm using the following xquery (after being helped by Christian).
declare variable $in external;
declare variable $out external;
declare variable $vendor external;
let $options := map { 'header': true() }
let $text := file:read-text($in)
let $xml := csv:parse($text, $options)
let $result := <csv>{
for $record in $xml//record[contains(VENDORS, $vendor) and not(contains(HOST, "Non external")) and not(empty(HOST))]
return <record>{
$record/(HOST, PATH, ATTACKCOUNT, TIME_STAMP,CK)
}</record>
}</csv>
return file:write-text($out, csv:serialize($result, $options))
I would like to have one of the returned records encrypted. How do I change that record before saving it?
I tried:
return <record>{
crypto:encrypt($record/CK, 'symmetric','keykeyke','DES'), $record/(HOST, PATH, ATTACKCOUNT, TIME_STAMP,CK)
}</record>
But that doesn't really change the CK field. I can't seem to modify anything in the $record/(HOST, PATH, ATTACKCOUNT, TIME_STAMP,CK).
Any thoughts?
Thanks,
Noam