Document class with createNode method