if (newChildCmNode != null) {
NodeList nodeList = parent.getChildNodes();
int len = nodeList.getLength();
for (int i=0; i<len; i++) {
try {
if (modelQuery.canInsert(parent, newChildCmNode, i, ModelQuery.VALIDITY_STRICT)) {
return nodeList.item(i);
}
} catch (Exception e) {
e.printStackTrace();
}