把文本框的值写入到xml文件中
protected void btn_write_Click(object sender, EventArgs e)
{
XmlWriterSettings settings=new XmlWriterSettings();
settings.Indent=true;
settings.IndentChars=" ";
using (XmlWriter write = XmlWriter.Create("E:\books.xml",settings))
{
write.WriteStartElement("book");
write.WriteElementString("price", txt_content.Text);
write.Flush();
}
}
相关文档:
首先要有一个简易的服务器,建立一个站点,然后站点下存放
1:crossdomain.xml 这个是跨与域策略文件,用于指定域通过Flash
Player访问本域的资源(如果服务器在本机就没有这个必要)但是远程的话就要(建议要)
文件内容:
<cross-domain-policy>
<allow-access-from domain="*" /> ......
技术介绍
在一般的Java项目中,生成word文档的时候,我们会使用到jacob来作为我们生成word文档的工具,但是jacob是通过使用JNI调用dll文件来实现,这样的工作方式带来了极大的性能开销.这里我们采用Velocity+zip+xml快速构建word2007文档,所以说这个技术实现有一定的局限性,生成的必须是word2007文档 ......
JAVA对象转换为XML格式
简单的颤述下如何将JAVA对象转换为XML格式,详细了解请进入http://xstream.codehaus.org/tutorial.html
JAVABEAN对象
userInfo.java
private String name;
& ......
class ImportExportToExcel
{
public class ImportExportToExcel
{
private string strConn;
private System.Windows.Forms.OpenFileDialog openFileDlg = new System.Windows.Forms.OpenFileDialog();
private System.Windows.Forms.SaveFileDialog saveFi ......
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
namespace jiu ......