Re: Difference when setting xml reader and not

PJ Fanning <[email protected]> Tue, 25 Apr 2023 14:06:10 +0000 (UTC)
Newsgroups gmane.comp.jakarta.poi.user
Message-ID <[email protected]>
If you use the method that does not take an explicit options instance, then default behaviour will happen. If you want non-default behaviour, you must always use `XmlObject.Factory.parse(str, options);`. 

I would think that most users would expect this to be the behaviour. 






On Tuesday 25 April 2023 at 15:57:38 GMT+2, Mikael Petterson <[email protected]> wrote: 





Hi,

We use

Method 1:

  XmlOptions options = new XmlOptions();
options.setLoadUseXMLReader(SAXParserFactory.newInstance().newSAXParser().getXMLReader());

XmlObject.Factory.parse(str, options);

As well as


Method 2:
XmlObject.Factory.parse(str);

We changed from jdom 1.1.3 to jdom2 and it seems that method 1 is picking up the change and gets affected but not method 2.

Which parser is then used for method 2?

Br,

//mike