Package com.xmlmind.xinclude

## Class XLoader

- java.lang.Object
- - com.xmlmind.domutil.LoaderImpl
  - - com.xmlmind.xinclude.XLoader

- All Implemented Interfaces:
    `Loader`

      public final class XLoader
      extends LoaderImpl

  An implementation of `Loader` which makes use of the XInclude 1.1 processor contained in this package.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `XLoader()` |
    `XLoader​(Console c)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Document` | `load​(InputStream in, URL url)` | Load document from specified input stream.
    `void` | `useBothLang()` | Use both "`xml:lang`" and "`lang`" as the language attributes.
    `void` | `useId()` | Use "`id`" as the ID attribute.
    `void` | `useLang()` | Use "`lang`" as the language attribute.
    `void` | `useXMLId()` | Use "`xml:id`" as the ID attribute.
    `void` | `useXMLLang()` | Use "`xml:lang`" as the language attribute.

    - ### Methods inherited from class com.xmlmind.domutil.LoaderImpl

      `createXMLReader, format, getConsole, getEntityResolver, isAddingElementPointer, load, load, setAddingElementPointer, setConsole, setEntityResolver`

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### XLoader

          public XLoader()

    - #### XLoader

          public XLoader​(Console c)

  - ### Method Detail

    - #### useXMLId

          public void useXMLId()

      Use "`xml:id`" as the ID attribute.

      Needed to process XIncludes in loaded pages.

      This setting is the default one.

    - #### useId

          public void useId()

      Use "`id`" as the ID attribute.

      Needed to process XIncludes in loaded pages.

    - #### useXMLLang

          public void useXMLLang()

      Use "`xml:lang`" as the language attribute.

      Needed to process XIncludes in loaded pages.

      This setting is the default one.

    - #### useLang

          public void useLang()

      Use "`lang`" as the language attribute.

      Needed to process XIncludes in loaded pages.

    - #### useBothLang

          public void useBothLang()

      Use both "`xml:lang`" and "`lang`" as the language attributes.

      Needed to process XIncludes in loaded pages.

    - #### load

          public Document load​(InputStream in,
                               URL url)
                        throws IOException

      Description copied from interface: `Loader`
      Load document from specified input stream.

      Note: `xi:include` elements (XInclude) are expected to have been processed in the loaded document.

      Specified by:
        `load` in interface `Loader`
      Overrides:
        `load` in class `LoaderImpl`
      Parameters:
        `in` - input stream allowing to load the document
        `url` - URL of the document to be loaded if known; `null` otherwise
      Returns:
        loaded document
      Throws:
        `IOException` - if, for any reason, an I/O exception is raised during the processing. Note that XML parse exception and XInclude exception are reported as `IOException`s.