Keine Cache-Version


Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code LNG204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.
javax.xml.stream

Class XMLInputFactory


  • public abstract class XMLInputFactory
    extends Object
    Defines an abstract implementation of a factory for getting streams. The following table defines the standard properties of this specification. Each property varies in the level of support required by each implementation. The level of support required is described in the 'Required' column.
    Configuration parameters
    Property Name Behavior Return type Default Value Required
    javax.xml.stream.isValidatingTurns on/off implementation specific DTD validationBooleanFalseNo
    javax.xml.stream.isNamespaceAwareTurns on/off namespace processing for XML 1.0 supportBooleanTrueTrue (required) / False (optional)
    javax.xml.stream.isCoalescingRequires the processor to coalesce adjacent character dataBooleanFalseYes
    javax.xml.stream.isReplacingEntityReferencesreplace internal entity references with their replacement text and report them as charactersBooleanTrueYes
    javax.xml.stream.isSupportingExternalEntitiesResolve external parsed entitiesBooleanUnspecifiedYes
    javax.xml.stream.supportDTDUse this property to request processors that do not support DTDsBooleanTrueYes
    javax.xml.stream.reportersets/gets the impl of the XMLReporter javax.xml.stream.XMLReporterNullYes
    javax.xml.stream.resolversets/gets the impl of the XMLResolver interfacejavax.xml.stream.XMLResolverNullYes
    javax.xml.stream.allocatorsets/gets the impl of the XMLEventAllocator interfacejavax.xml.stream.util.XMLEventAllocatorNullYes

    Erste Seite von API Java Inhaltsverzeichnis Haut

    Since:
    1.6
    See Also:
    XMLOutputFactory, XMLEventReader, XMLStreamReader, EventFilter, XMLReporter, XMLResolver, XMLEventAllocator
    • Field Detail

      • IS_NAMESPACE_AWARE

        public static final String IS_NAMESPACE_AWARE
        The property used to turn on/off namespace support, this is to support XML 1.0 documents, only the true setting must be supported
        See Also:
        Constant Field Values
      • IS_VALIDATING

        public static final String IS_VALIDATING
        The property used to turn on/off implementation specific validation
        See Also:
        Constant Field Values
      • IS_COALESCING

        public static final String IS_COALESCING
        The property that requires the parser to coalesce adjacent character data sections
        See Also:
        Constant Field Values
      • IS_REPLACING_ENTITY_REFERENCES

        public static final String IS_REPLACING_ENTITY_REFERENCES
        Requires the parser to replace internal entity references with their replacement text and report them as characters
        See Also:
        Constant Field Values
      • IS_SUPPORTING_EXTERNAL_ENTITIES

        public static final String IS_SUPPORTING_EXTERNAL_ENTITIES
        The property that requires the parser to resolve external parsed entities
        See Also:
        Constant Field Values
      • SUPPORT_DTD

        public static final String SUPPORT_DTD
        The property that requires the parser to support DTDs
        See Also:
        Constant Field Values
      • REPORTER

        public static final String REPORTER
        The property used to set/get the implementation of the XMLReporter interface
        See Also:
        Constant Field Values
      • RESOLVER

        public static final String RESOLVER
        The property used to set/get the implementation of the XMLResolver
        See Also:
        Constant Field Values
      • ALLOCATOR

        public static final String ALLOCATOR
        The property used to set/get the implementation of the allocator
        See Also:
        Constant Field Values
    • Constructor Detail

      • XMLInputFactory

        protected XMLInputFactory()
    • Method Detail

      • newFactory

        public static XMLInputFactory newFactory()
                                          throws FactoryConfigurationError
        Create a new instance of the factory. This static method creates a new factory instance. This method uses the following ordered lookup procedure to determine the XMLInputFactory implementation class to load: Use the javax.xml.stream.XMLInputFactory system property. Use the properties file "lib/stax.properties" in the JRE directory. This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above. Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API will look for a classname in the file META-INF/services/javax.xml.stream.XMLInputFactory in jars available to the runtime. Platform default XMLInputFactory instance. Once an application has obtained a reference to a XMLInputFactory it can use the factory to configure and obtain stream instances. Note that this is a new method that replaces the deprecated newInstance() method. No changes in behavior are defined by this replacement method relative to the deprecated method.
        Throws:
        FactoryConfigurationError - if an instance of this factory cannot be loaded
      • newFactory

        public static XMLInputFactory newFactory(String factoryId,
                                 ClassLoader classLoader)
                                          throws FactoryConfigurationError
        Create a new instance of the factory. If the classLoader argument is null, then the ContextClassLoader is used. Note that this is a new method that replaces the deprecated newInstance(String factoryId, ClassLoader classLoader) method. No changes in behavior are defined by this replacement method relative to the deprecated method.
        Parameters:
        factoryId - Name of the factory to find, same as a property name
        classLoader - classLoader to use
        Returns:
        the factory implementation
        Throws:
        FactoryConfigurationError - if an instance of this factory cannot be loaded
      • createXMLEventReader

        public abstract XMLEventReader createXMLEventReader(XMLStreamReader reader)
                                                     throws XMLStreamException
        Create a new XMLEventReader from an XMLStreamReader. After being used to construct the XMLEventReader instance returned from this method the XMLStreamReader must not be used.
        Parameters:
        reader - the XMLStreamReader to read from (may not be modified)
        Returns:
        a new XMLEventReader
        Throws:
        XMLStreamException
      • getXMLResolver

        public abstract XMLResolver getXMLResolver()
        The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
      • setXMLResolver

        public abstract void setXMLResolver(XMLResolver resolver)
        The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
        Parameters:
        resolver - the resolver to use to resolve references
      • getXMLReporter

        public abstract XMLReporter getXMLReporter()
        The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
      • setXMLReporter

        public abstract void setXMLReporter(XMLReporter reporter)
        The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
        Parameters:
        reporter - the resolver to use to report non fatal errors
      • setProperty

        public abstract void setProperty(String name,
                       Object value)
                                  throws IllegalArgumentException
        Allows the user to set specific feature/property on the underlying implementation. The underlying implementation is not required to support every setting of every property in the specification and may use IllegalArgumentException to signal that an unsupported property may not be set with the specified value.

        All implementations that implement JAXP 1.5 or newer are required to support the XMLConstants.ACCESS_EXTERNAL_DTD property.

        Parameters:
        name - The name of the property (may not be null)
        value - The value of the property
        Throws:
        IllegalArgumentException - if the property is not supported
      • getProperty

        public abstract Object getProperty(String name)
                                    throws IllegalArgumentException
        Get the value of a feature/property from the underlying implementation
        Parameters:
        name - The name of the property (may not be null)
        Returns:
        The value of the property
        Throws:
        IllegalArgumentException - if the property is not supported
      • isPropertySupported

        public abstract boolean isPropertySupported(String name)
        Query the set of properties that this factory supports.
        Parameters:
        name - The name of the property (may not be null)
        Returns:
        true if the property is supported and false otherwise
      • setEventAllocator

        public abstract void setEventAllocator(XMLEventAllocator allocator)
        Set a user defined event allocator for events
        Parameters:
        allocator - the user defined allocator
      • getEventAllocator

        public abstract XMLEventAllocator getEventAllocator()
        Gets the allocator used by streams created with this factory

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-javax/xml/stream/xmlinputfactory.html/.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : https://docs.oracle.com

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut