I am following a guide, and it gives me the following code:
InputSource inputSource = new InputSource(new FileInputStream(new File(\"/path/to/xml/file.xml\"))));
InputSource inputSource = new InputSource(new java.io.StringReader(string)); if it is org.xml.sax.InputSource.
InputSource inputSource = new InputSource(new java.io.StringReader(string));
org.xml.sax.InputSource
Use a StringReader instead of a FileInputStream.
StringReader
FileInputStream
See the documentation for StringReader
example:
InputSource inputSource = new InputSource( new StringReader( myString ) );