hi
i have generated xml file using jsp,but i want the generated xml file should be saved as a file. my code is
<?xml version="1.0" encoding="UTF-8"?>
<%@ page contentType="text/xml;charset=ISO-8859-1" %>
<playlist version="1" xmlns = "http://xspf.org/ns/0/">
<title>My Band Rocks Your Socks</title>
<trackList>
<%! String[] sports; %>
<%
sports = request.getParameterValues("sports");
if (sports != null)
{
for (int i = 0; i < sports.length; i++)
{
// out.println (sports[i]);
String total=sports[i];
String[] sa=total.split("[,]");
// String[] sub=new String();
out.print("<track>");
for (int j=0;j<sa.length;j++)
{
// out.println(sa[j]);
// out.println("sa["+j+"]="+sa[j]);
if( j == 0)
{
out.print("<location>" + sa[0] +"</location>");
}
else if (j == 1)
{
out.print("<image>" + sa[1] +"</image>");
}
else if( j==2)
{
out.print("<title>" + sa[2] +"</title>");
}
}// end of inner for loop()
out.print("</track>");
//out.println();
}// end of outer for()
}
//else out.println ("<b>none<b>");
%>
</trackList>
</playlist>