Hi
I am trying to convert a
String data to a xml file.
I am taking the data from the queue, this data is basically a xml file which is coming in a string format . I have to process it as a xml file and then need to parse it using DOM
The following is the code snippet:
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
File f=new File(message);
Document
doc = builder.parse(f);
Note: the variable message is a string data which is nothing but a xml file content
But this way is not working out. Please advice.