DOM construction utility