Instead of using Xalan, Xerces or something else directly you should useJAXP.This is a common interface and set of APIs for working with XML. Go to sunand read about JAXP.