private XMLStreamReader parse(InputStream is, String systemIdStr, boolean restricted) throws IOException, XMLStreamException { if (!quietmode) { LOG.debug("parsing input stream " + is); } if (is == null) { return null; } SystemId systemId = SystemId.construct(systemIdStr); ReaderConfig readerConfig = XML_INPUT_FACTORY.createPrivateConfig(); if (restricted) { readerConfig.setProperty(XMLInputFactory.SUPPORT_DTD, false); } return XML_INPUT_FACTORY.createSR(readerConfig, systemId, StreamBootstrapper.getInstance(null, systemId, is), false, true); }
public boolean setProperty(String name, Object value) { // Basic config accessor works just fine... return mConfig.setProperty(name, value); }
public void setProperty(String propName, Object value) { if (!mConfig.setProperty(propName, value)) { if (XMLInputFactory.ALLOCATOR.equals(propName)) { setEventAllocator((XMLEventAllocator) value); } } }
public void setFeature(String name, Object value) { // Referring to DTD-related features? if (name.equals(FEATURE_DTD_OVERRIDE)) { /* !!! 06-Feb-2007, TSa: Null with 4.0 will actually mean * 'remove any overrides'; which is different from earlier * meaning (which was use a dummy/empty override). * Should we throw an exception, or warn, or something...? */ if (value != null && !(value instanceof DTDValidationSchema)) { throw new IllegalArgumentException("Value to set for feature "+name+" not of type DTDValidationSchema"); } mConfig.setProperty(XMLInputFactory2.P_DTD_OVERRIDE, (DTDValidationSchema) value); } else { super.setFeature(name, value); } }
/** * @param name Name of the property to set * @param value Value to set property to. * * @return True, if the specified property was <b>succesfully</b> * set to specified value; false if its value was not changed */ public boolean setProperty(String name, Object value) { boolean ok = mConfig.setProperty(name, value); /* To make [WSTX-50] work fully dynamically (i.e. allow * setting BASE_URL after stream reader has been constructed) * need to force */ if (ok && WstxInputProperties.P_BASE_URL.equals(name)) { // Easiest to just access from config: may come in as a String etc mInput.overrideSource(mConfig.getBaseURL()); } return ok; }
@Override public boolean setProperty(String name, Object value) { // Basic config accessor works just fine... return mConfig.setProperty(name, value); }
public boolean setProperty(String name, Object value) { // Basic config accessor works just fine... return mConfig.setProperty(name, value); }
@Override public boolean setProperty(String name, Object value) { // Basic config accessor works just fine... return mConfig.setProperty(name, value); }
@Override public boolean setProperty(String name, Object value) { // Basic config accessor works just fine... return mConfig.setProperty(name, value); }
public void setProperty(String propName, Object value) { if (!mConfig.setProperty(propName, value)) { if (XMLInputFactory.ALLOCATOR.equals(propName)) { throw new IllegalArgumentException("Event allocator not usable with J2ME subset."); } } }
public void setProperty(String propName, Object value) { if (!mConfig.setProperty(propName, value)) { if (XMLInputFactory.ALLOCATOR.equals(propName)) { throw new IllegalArgumentException("Event allocator not usable with J2ME subset."); } } }
public void setProperty(String propName, Object value) { if (!mConfig.setProperty(propName, value)) { if (XMLInputFactory.ALLOCATOR.equals(propName)) { throw new IllegalArgumentException("Event allocator not usable with J2ME subset."); } } }
@Override public void setProperty(String propName, Object value) { if (!mConfig.setProperty(propName, value)) { if (XMLInputFactory.ALLOCATOR.equals(propName)) { setEventAllocator((XMLEventAllocator) value); } } }
@Override public void setProperty(String propName, Object value) { if (!mConfig.setProperty(propName, value)) { if (XMLInputFactory.ALLOCATOR.equals(propName)) { setEventAllocator((XMLEventAllocator) value); } } }
public void setProperty(String propName, Object value) { if (!mConfig.setProperty(propName, value)) { if (XMLInputFactory.ALLOCATOR.equals(propName)) { setEventAllocator((XMLEventAllocator) value); } } }
public void setProperty(String propName, Object value) { if (!mConfig.setProperty(propName, value)) { if (XMLInputFactory.ALLOCATOR.equals(propName)) { setEventAllocator((XMLEventAllocator) value); } } }
public void setProperty(String propName, Object value) { if (!mConfig.setProperty(propName, value)) { if (XMLInputFactory.ALLOCATOR.equals(propName)) { setEventAllocator((XMLEventAllocator) value); } } }
public void setProperty(String propName, Object value) { if (!mConfig.setProperty(propName, value)) { if (XMLInputFactory.ALLOCATOR.equals(propName)) { setEventAllocator((XMLEventAllocator) value); } } }
@Override public void setProperty(String propName, Object value) { if (!mConfig.setProperty(propName, value)) { if (XMLInputFactory.ALLOCATOR.equals(propName)) { setEventAllocator((XMLEventAllocator) value); } } }
public JaxbYElementBuilder(Class<?> objectFactoryClass, JaxbObjectConverter<T> objectConverter, JaxbTypedObjectFactory<T> typedObjectFactory) { try { inputFactory.configureForXmlConformance(); ReaderConfig config = inputFactory.getConfig(); config.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, true); config.setProperty(XMLInputFactory.IS_VALIDATING, false); context = JAXBContext.newInstance(objectFactoryClass); } catch (JAXBException e) { throw new ConfigurationException(e); } this.objectConverter = objectConverter; this.typedObjectFactory = typedObjectFactory; }