Class XomDriver

All Implemented Interfaces:
HierarchicalStreamDriver

public class XomDriver extends AbstractXmlDriver
  • Field Details

    • builder

      private final nu.xom.Builder builder
  • Constructor Details

  • Method Details

    • getBuilder

      protected nu.xom.Builder getBuilder()
      Deprecated.
      As of 1.4.9, overload createBuilder() instead
    • createBuilder

      protected nu.xom.Builder createBuilder()
      Create the Builder instance. A XOM builder is a wrapper around a XMLReader instance which is not thread-safe by definition. Therefore each reader should use its own builder instance to avoid concurrency problems. Overload this method to configure the generated builder instances e.g. to activate validation.
      Returns:
      the new builder
      Since:
      1.4.9
    • createReader

      public HierarchicalStreamReader createReader(Reader text)
      Description copied from interface: HierarchicalStreamDriver
      Create the HierarchicalStreamReader with the stream parser reading from the IO reader.
      Parameters:
      text - the Reader with the data to parse
      Returns:
      the HierarchicalStreamReader
    • createReader

      public HierarchicalStreamReader createReader(InputStream in)
      Description copied from interface: HierarchicalStreamDriver
      Create the HierarchicalStreamReader with the stream parser reading from the input stream.
      Parameters:
      in - the InputStream with the data to parse
    • createReader

      public HierarchicalStreamReader createReader(URL in)
      Description copied from class: AbstractDriver
      Create the HierarchicalStreamReader with the stream parser reading from a URL. Depending on the parser implementation, some might take the URL as SystemId to resolve additional references.
      Specified by:
      createReader in interface HierarchicalStreamDriver
      Overrides:
      createReader in class AbstractDriver
      Parameters:
      in - the URL defining the location with the data to parse
      Returns:
      the HierarchicalStreamReader
    • createReader

      public HierarchicalStreamReader createReader(File in)
      Description copied from class: AbstractDriver
      Create the HierarchicalStreamReader with the stream parser reading from a File. Depending on the parser implementation, some might take the file path as SystemId to resolve additional references.
      Specified by:
      createReader in interface HierarchicalStreamDriver
      Overrides:
      createReader in class AbstractDriver
      Parameters:
      in - the URL defining the location with the data to parse
      Returns:
      the HierarchicalStreamReader
    • createWriter

      public HierarchicalStreamWriter createWriter(Writer out)
      Description copied from interface: HierarchicalStreamDriver
      Create the HierarchicalStreamWriter with the formatted writer.
      Parameters:
      out - the Writer to receive the formatted data
      Returns:
      the HierarchicalStreamWriter
    • createWriter

      public HierarchicalStreamWriter createWriter(OutputStream out)
      Description copied from interface: HierarchicalStreamDriver
      Create the HierarchicalStreamWriter with the formatted writer.
      Parameters:
      out - the OutputStream to receive the formatted data
      Returns:
      the HierarchicalStreamWriter