It looks like you are trying to use a DOM feature which hasn't been implemented in Xerces, which from the stack trace looks like the HTML module. Try the following program to check what modules your implementation supports.