public static
String beantoxml(Object bean){
byte currentXMLBytes[]
XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(new FileOutputStream("MyXML.xml")));
encoder.writeObject(bean);
encoder.close();
}
in this function instead of xml file i need the string directly, without creating the temp xml and reading from that