Package org.springframework.xml.sax
Class SaxUtils
java.lang.Object
org.springframework.xml.sax.SaxUtils
Convenient utility methods for dealing with SAX.
- Since:
- 1.0.0
- Author:
- Arjen Poutsma
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic InputSource
createInputSource
(org.springframework.core.io.Resource resource) Creates a SAXInputSource
from the given resource.static String
getSystemId
(org.springframework.core.io.Resource resource) Retrieves the URL from the given resource as System ID.
-
Constructor Details
-
SaxUtils
public SaxUtils()
-
-
Method Details
-
createInputSource
public static InputSource createInputSource(org.springframework.core.io.Resource resource) throws IOException Creates a SAXInputSource
from the given resource. Sets the system identifier to the resource'sURL
, 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
Retrieves the URL from the given resource as System ID. Returnsnull
if it cannot be opened.
-