public class XmlUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ENCODING |
Modifier | Constructor and Description |
---|---|
private |
XmlUtil() |
Modifier and Type | Method and Description |
---|---|
static org.xml.sax.InputSource |
xmlAsInputSource(XmlString xmlText)
Returns input source with "UTF-8" encoding for XML content.
|
static java.io.InputStream |
xmlAsInputStream(java.io.File xmlFile,
boolean isOnClasspath)
Returns input stream for file.
|
static java.io.InputStream |
xmlAsInputStream(java.lang.String xmlFileUri,
boolean isOnClasspath)
Returns input stream for file path, on classpath or not.
|
static java.io.InputStream |
xmlAsInputStream(XmlString xmlText)
Returns input stream for XML content.
|
public static final java.lang.String ENCODING
public static java.io.InputStream xmlAsInputStream(java.io.File xmlFile, boolean isOnClasspath) throws XmlParsingException, ResourceNotOnClasspathException
xmlFile
- non-null file.isOnClasspath
- whether to search for xmlFileUri
on the classpath.ResourceNotOnClasspathException
XmlParsingException
public static java.io.InputStream xmlAsInputStream(java.lang.String xmlFileUri, boolean isOnClasspath) throws XmlException, ResourceNotOnClasspathException
xmlFileUri
- non-null, non-empty file URI.isOnClasspath
- whether to search for xmlFileUri
on the classpath.ResourceNotOnClasspathException
XmlParsingException
XmlException
public static java.io.InputStream xmlAsInputStream(XmlString xmlText)
xmlText
- XmlException
public static org.xml.sax.InputSource xmlAsInputSource(XmlString xmlText)
xmlText
- XmlParsingException
Copyright 2009-2015 Tatjana (Tanja) Kostic