1

I am doing a unit testing.

there is a method where xml need to be passed , in the method the parameter type is String I have the xml file in my laptop.

can some one suggest me how we can pass this xml file data to the method ?

4
  • please let me know if my question is not clear or need more clarification Commented May 19, 2017 at 12:22
  • Possible duplicate of Java : Convert formatted xml file to one line string Commented May 19, 2017 at 12:24
  • Read your XML File with BufferedReader and then append with StringBuffer Commented May 19, 2017 at 12:44
  • Possible duplicate of Read file As String Commented May 19, 2017 at 12:52

1 Answer 1

0

need more clarification

I guess, that the String varibale is the path name of the xml-file on your laptop: e.g.

"D:\\temp\\the_xmlfile.xml" 
Sign up to request clarification or add additional context in comments.

1 Comment

no Norbert .. I printed the value which is going into the java method. its a proper XML - (LONG type - Oracle PL/SQL). the overall scenario is a PL/SQL package is calling a java class , I inserted the parameter value,which is going into the java class into a table and now am testing the java code

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.