My application uses XForms to view it, and XForms generates XML output containing a user-defined response. If we include the following line
<fr:xforms-inspector xmlns:fr="http://orbeon.org/oxf/xml/form-runner"/>
in the code we see the generated output on the screen. Therefore, for the username, if the user type amit, it will also have generated XML.
I really wanted to get this generated XML in my Java class to store it in the database and parse it and share its contents. I tried the following code to get this XML, but could not get the generated XML.
BufferedReader requestData = new BufferedReader(new InputStreamReader(request.getInputStream()));
StringBuffer stringBuffer = new StringBuffer();
String line;
try{
while ((line = requestData.readLine()) != null) {
stringBuffer.append(line);
}
} catch (Exception e){}
return stringBuffer.toString();
}
Please let me know what I'm doing badly.
source
share