How to combine multiple xml files into a single string in java

DorWD

New Member
I have several xml files with different node structure. I want to extract xml content from each of these xml files and store former(xml content) as a single string.I am using following code to achieve it\[code\] String xmlContent = FileUtils.readFileToString(new File("xyz"), "UTF-8");\[/code\]but i am facing following error\[code\] [Fatal Error] :5616:15: The processing instruction target matching "[xX][mM][lL]" is not allowed.\[/code\]After searching i found that aforesaid error occurs because "" present in between the xml content.Should i first modify xml files or there is any other way handle this situation?
 
Back
Top