T
- the property typepublic class XmlReadingWritableProperty<T> extends XmlReadingProperty<T>
DocumentBuilderFactory
and
properties of SAXParser
and XMLReader
in a typed way.Constructor and Description |
---|
XmlReadingWritableProperty(String name)
Allows reading and writing attributes of
DocumentBuilderFactory and
properties of XMLReader in a typed way. |
Modifier and Type | Method and Description |
---|---|
void |
set(DocumentBuilderFactory documentBuilderFactory,
T value)
Allows the user to set specific attributes on the underlying implementation.
|
void |
set(SAXParser saxParser,
T value)
Sets the particular property in the underlying implementation of
XMLReader . |
void |
set(XMLReader xmlReader,
T value)
Set the value of a property.
|
get, get, get, getName
public XmlReadingWritableProperty(String name)
DocumentBuilderFactory
and
properties of XMLReader
in a typed way.name
- the property namepublic void set(DocumentBuilderFactory documentBuilderFactory, @Nullable T value)
documentBuilderFactory
- the document builder factoryvalue
- the value of the attributeDocumentBuilderFactory.setAttribute(String, Object)
public void set(SAXParser saxParser, @Nullable T value) throws SAXNotRecognizedException, SAXNotSupportedException
XMLReader
. A list of the core features and properties can be found at
http://sax.sourceforge.net/?selected=get-set.saxParser
- the SAX parservalue
- the value of the property to be setSAXNotRecognizedException
- when the underlying XMLReader
does
not recognize the property nameSAXNotSupportedException
- when the underlying XMLReader
recognizes the property name but doesn't
support the propertyset(XMLReader, Object)
public void set(XMLReader xmlReader, @Nullable T value) throws SAXNotRecognizedException, SAXNotSupportedException
It is possible for an XMLReader
to recognize a property name but to
be unable to change the current value. Some property values may be immutable
or mutable only in specific contexts, such as before, during, or after a
parse.
XMLReader
s are not required to recognize setting any specific
property names.
xmlReader
- the XML readervalue
- the requested value for the propertySAXNotRecognizedException
- if the property value can't be assigned or
retrievedSAXNotSupportedException
- when xmlReader
recognizes the
property name but cannot set the requested
valueXMLReader.setProperty(String, Object)
Copyright © 2025. All rights reserved.