javax.xml.parsers.DocumentBuilderFactory is an interface not a class. Please check what implementation you are using (use getClass().getName() on the result).
I can't see anything wrong with your code. But of course that doesn't mean it's right!
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference