Class ResourceSource

java.lang.Object
javax.xml.transform.sax.SAXSource
org.springframework.xml.transform.ResourceSource
All Implemented Interfaces:
Source

public class ResourceSource extends SAXSource
Convenient subclass of SAXSource that reads from a Spring Resource. The resource to be read can be set via the constructor.
Since:
1.0.0
Author:
Arjen Poutsma
  • Constructor Details

    • ResourceSource

      public ResourceSource(org.springframework.core.io.Resource content) throws IOException
      Initializes a new instance of the ResourceSource with the given resource.
      Parameters:
      content - the content
      Throws:
      IOException
    • ResourceSource

      public ResourceSource(XMLReader reader, org.springframework.core.io.Resource content) throws IOException
      Initializes a new instance of the ResourceSource with the given XMLReader and resource.
      Parameters:
      content - the content
      Throws:
      IOException