Class SaxUtils

java.lang.Object
org.springframework.xml.sax.SaxUtils

public abstract class SaxUtils extends Object
Convenient utility methods for dealing with SAX.
Since:
1.0.0
Author:
Arjen Poutsma
  • Constructor Details

    • SaxUtils

      public SaxUtils()
  • Method Details

    • createInputSource

      public static InputSource createInputSource(org.springframework.core.io.Resource resource) throws IOException
      Creates a SAX InputSource from the given resource. Sets the system identifier to the resource's URL, if available.
      Parameters:
      resource - the resource
      Returns:
      the input source created from the resource
      Throws:
      IOException - if an I/O exception occurs
      See Also:
    • getSystemId

      public static String getSystemId(org.springframework.core.io.Resource resource)
      Retrieves the URL from the given resource as System ID. Returns null if it cannot be opened.