WstxInputFactory f = (WstxInputFactory) getInputFactory();
ReaderConfig cfg = f.getConfig();
// Settings we always need:
cfg.doSupportDTDs(true);
cfg.doValidateWithDTD(false);
// Then variable ones we got settings for:
cfg.doSupportNamespaces(ns);
cfg.doCoalesceText(coalescing);
cfg.doReplaceEntityRefs(autoEntity);