javaxmlstaxfasterxmlwoodstox

Is there a way to set the entity expansion limit in woodstox?


woodstox library has the limit of 100,000 expansions by default. Is there a way to configure that to lower level (say 1000)?


Solution

  • Yes there is. I have been planning to write a blog entry about this (so far only gotten https://medium.com/@cowtowncoder/configuring-woodstox-xml-parser-basic-stax-properties-39bdf88c18ec done), but the setting is via XMLInputFactory.setProperty(), for key found from WstxInputProperties -- specifically I think P_MAX_ENTITY_COUNT.