public static SchemaFactory getSchemaFactory() throws SAXException {
        SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
        setProperty(schemaFactory, XMLConstants.ACCESS_EXTERNAL_SCHEMA);
        setProperty(schemaFactory, XMLConstants.ACCESS_EXTERNAL_DTD);
        return schemaFactory;
    }
@Test
    public void testGetSchemaFactory() throws Exception {
        SchemaFactory schemaFactory = XmlUtil.getSchemaFactory();
        assertNotNull(schemaFactory);
        assertThrows(SAXException.class, () -> XmlUtil.setProperty(schemaFactory, "test://no-such-property"));
        ignoreXxeFailureProp.setOrClearProperty("false");
        assertThrows(SAXException.class, () -> XmlUtil.setProperty(schemaFactory, "test://no-such-property"));
        ignoreXxeFailureProp.setOrClearProperty("true");
        XmlUtil.setProperty(schemaFactory, "test://no-such-property");
    }