// definition, just delete all content
for (int i = 0; i < elem.getChildCount(); i++) {
elem.detachChild(i);
}
elem.compactChildren();
} else {
// reference may be to other namespace, so convert to qualified name string
StringBuffer buff = new StringBuffer();