Added validator for allowed child nodes.
Fix for Py3.x