since no one has responded...
CR can read XML as a datasource, but as an embedded source, I doubt it...it will see it as the string.
what do you mean by one data element? Do you want all occurrances? Either way the solution is about the same. You would look for your tag in the string using INSTR(), then you would want to find the location of the closing tag, and finally you would want to extract the value.
If you want all the values, just loop and add them to a delimited string...Something like:
local numbervar iStart:=0;
local numbervar iEnd;
local numbervar iTag:=len("<xml tag>")
local stringvar sValue:="";
iStart := instr(istart+1,{table.field}, "<xml tag>") + iTag;
if iStart > 0 then(
iEnd:=instart(istart, {table.field}"</xml tag>");
sValue := sValue + mid({table.field}, iStart, iEnd - iStart - 1);
)
sValue
This will get the first occurrance of the field. You can add a loop very easily to the above (look in help for the syntax).
Adding a loop will bring a list of values. If you need to perform any sort of counting or summing, you will need to do that in the formula as.
HTH