oAttr = oDoc.attribute(sKey);
oAttr.set(((Double) oVal).doubleValue());
} else if (oVal instanceof String[]) {
String[] aStrs = (String[]) oVal;
oAttr = oDoc.attribute(sKey);
if (!oAttr.type().isMultivaluable()) throw new AttributeTypeHasValuesException("Cannot set multiple values for attribute "+sKey);
int nVals = oAttr.count();
for (int c=0; c<aStrs.length; c++) {
if (c<nVals)
oAttr.get(c).set(aStrs[c]);
else
oAttr.add().set(aStrs[c]);
} // next
} else if (oVal instanceof BigDecimal[]) {
oAttr = oDoc.attribute(sKey);
if (!oAttr.type().isMultivaluable()) throw new AttributeTypeHasValuesException("Cannot set multiple values for attribute "+sKey);
int nVals = oAttr.count();
BigDecimal[] aDecs = (BigDecimal[]) oVal;
for (int c=0; c<aDecs.length; c++) {
try {
BigInteger oBig = aDecs[c].toBigIntegerExact();