8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For now it calls factory.setValidating(true); which is inappropriate in some use case :
factory.setValidating(true);
Would be great to be able to configure the behaviour for factory.newDocumentBuilder()
factory.newDocumentBuilder()
The text was updated successfully, but these errors were encountered:
since there's only two usage for DocumentBuilderFactory.newInstance() we could :
Any preference for a pull request ? (later one is only supported since 1.6)
Sorry, something went wrong.
Since there are several places where I have to created XML related classes, the more general solution of a SPI would be desirable.
package io.jenetics.jpx; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLOutputFactory; public abstract class XMLProvider { protected XMLProvider() { } // Used for reading files. public XMLInputFactory xmlInputFactory() { return XMLInputFactory.newInstance(); } // Used for writing files. public XMLOutputFactory xmlOutputFactory() { return XMLOutputFactory.newInstance(); } // Used for creating GPX extensions documents. public DocumentBuilderFactory documentBuilderFactory() { final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setValidating(true); factory.setIgnoringElementContentWhitespace(true); factory.setNamespaceAware(true); return factory; } public static XMLProvider provider() { // Do service lookup and return default impl if nothing is found. return null; } }
I think this could solve the XML problems once and for all ;-)
Merged into r1.7.0 branch.
avianey
No branches or pull requests
For now it calls
factory.setValidating(true);
which is inappropriate in some use case :Would be great to be able to configure the behaviour for
factory.newDocumentBuilder()
The text was updated successfully, but these errors were encountered: