Hello I've written small class in java to read in xml file as a string, not my question is following : how do I append string so it outputs only what is between Physical_Order_List_Array tags
here is a java class :
public static String getFileContent(String fileName)
{
BufferedReader br = null;
StringBuilder sb = new StringBuilder();
try {
br = new BufferedReader(new FileReader(fileName));
try {
String s;
while((s = br.readLine()) != null)
{
sb.append(s);
sb.append("\n");
}
}
finally {
br.close();
}
}
catch (Exception ex) {
ex.printStackTrace();
}
return sb.toString();
}
here is some of xml file its quite large :
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
.....
.....
.....some content
....here is what I only need
<Physical_Order_List_Array>
....now I need to get this portion of the code, append string to only output what is beetween these tags, including these tags as well
</Physical_Order_List_Array>
.....
.....
.....
Thank you for your answers