Class XmlObjectFactory<T>


  • public class XmlObjectFactory<T>
    extends DocumentFactory<T>
    Factory class for creating new instances. Note that if a type can be inferred from the XML being loaded (for example, by recognizing the document element QName), then the instance returned by a factory will have the inferred type. Otherwise the Factory will returned an untyped document.
    • Constructor Summary

      Constructors 
      Constructor Description
      XmlObjectFactory​(java.lang.String typeHandle)  
      XmlObjectFactory​(SchemaTypeSystem typeSystem, java.lang.String typeHandle)
      This constructor is only used as a workaround for bootstrapping the XML schemas - don't use it!
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.w3c.dom.DOMImplementation newDomImplementation()
      Creates a new DOMImplementation object
      org.w3c.dom.DOMImplementation newDomImplementation​(XmlOptions options)
      Creates a new DOMImplementation object, taking options
      T newInstance()
      Creates a new, completely empty instance.
      T newInstance​(XmlOptions options)
      Creates a new, completely empty instance, specifying options for the root element's document type and/or whether to validate value facets as they are set.
      T newValue​(java.lang.Object obj)
      Creates an immutable XmlObject value
      XmlSaxHandler newXmlSaxHandler()
      Returns an XmlSaxHandler that can load an XmlObject from SAX events.
      XmlSaxHandler newXmlSaxHandler​(XmlOptions options)
      Returns an XmlSaxHandler that can load an XmlObject from SAX events.
      T parse​(java.io.File file)
      Parses the given File as XML.
      T parse​(java.io.File file, XmlOptions options)
      Parses the given File as XML.
      T parse​(java.io.InputStream is)
      Decodes and parses the given InputStream as XML.
      T parse​(java.io.InputStream is, XmlOptions options)
      Decodes and parses the given InputStream as XML.
      T parse​(java.io.Reader r)
      Parses the given Reader as XML.
      T parse​(java.io.Reader r, XmlOptions options)
      Parses the given Reader as XML.
      T parse​(java.lang.String xmlAsString)
      Parses the given String as XML.
      T parse​(java.lang.String xmlAsString, XmlOptions options)
      Parses the given String as XML.
      T parse​(java.net.URL u)
      Downloads the given URL as XML.
      T parse​(java.net.URL u, XmlOptions options)
      Downloads the given URL as XML.
      T parse​(javax.xml.stream.XMLStreamReader xsr)
      Decodes and parses the given XMLStreamReader as XML.
      T parse​(javax.xml.stream.XMLStreamReader xsr, XmlOptions options)
      Parses the given XMLStreamReader as XML.
      T parse​(org.w3c.dom.Node node)
      Converts the given DOM Node into an XmlObject.
      T parse​(org.w3c.dom.Node node, XmlOptions options)
      Converts the given DOM Node into an XmlObject.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait