shared items

Friday, September 5, 2008

xml from xsl overlap file

Document doc = request.getFormData();
Element root = doc.getRootElement();
Element data = root.getChild("data");

String xslpath = xslDir + "/" + xslfile;
String output = transform(xslpath, doc, request);

try
{
String strCustNumber = data.getChild("bankid").getText() + data.getChild("unitid").getText().substring(0, 5);

File outfile = getFileByCustomer(strCustNumber);

report.reportRequest(request, new File(aDir, outfile.getName())); // keep track of where we write the request

// take transformed XML and append to file.
fout = new FileOutputStream(outfile, true);
fout.write(output.getBytes());
fout.flush();

No comments: