Check length of childNodes in setDataToElement()