A DOM construction utility