I am automating changing of some XML files through documentation builder factory
but in the one of the attribute entity reference ' getting change to ' . I don’t want that change to happen.
docBuilderFactory.setValidating(false);
docBuilderFactory.setExpandEntityReferences(false);
but nothing seems to work
This is a more of a hack, but you can escape it before processing:
Then the processor will expand
'to'.