added option to resolve numeric entities or not