How do I create an org.xml.sax.InputSource from a String?

后端 未结 2 1913
情话喂你
情话喂你 2021-02-03 17:52

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\"))));         


        
2条回答
  •  梦毁少年i
    2021-02-03 18:03

    InputSource inputSource = new InputSource(new java.io.StringReader(string)); if it is org.xml.sax.InputSource.

提交回复
热议问题