protected void _setChild(QName qname, OMElement element) {
OMElement e = getFirstChildWithName(qname);
if (e == null && element != null) {
addChild(element);
} else if (e != null && element != null) {
e.insertSiblingBefore(element);
e.discard();
} else if (e != null && element == null) {
e.discard();
}
}