ajax 发送xml文件,java接受xml文件并解析
红色字体为主要代码
jsp页面中
<script language="javascript">
function updateDB(operate){
var objDom=new ActiveXObject("msxml.DomDocument");
var objRoot=objDom.createElement("All");
objDom.appendChild(objRoot);
var k=document.getElementsByName("check"); //选择框
for(var i=0;i<k.length;i++){
if(k[i].checked){ //将选择的数据组合成xml格式的数据
var currentRow=k[i].parentNode.parentNode;
var obj=objDom.createElement("Good");
objRoot.appendChild(obj);
var objNode=objDom.createElement("xl_id");
objNode.text=k[i].value;
obj.appendChild(objNode);
objNode=objDom.createElement("xqnum");
objNode.text=currentRow.cells[5].childNodes[0].value;
obj.appendChild(objNode);
objNode=objDom.createElement("desc");
objNode.text=currentRow.cells[7].childNodes[0].value;
obj.appendChild(objNode);
}
}
ajaxSendPost("qgApplyAction.do?method="+operate.name,objDom,null);//自己封装的ajax请求 第一个参数为url,第二个为传送参数,第三个是回调函数
}
</script>
后台action.java代码接收xml文件 代码如下
引入的包如下
import org.w
相关文档:
List的用法
List包括List接口以及List接口的所有实现类。因为List接口实现了Collection接口,所以List接口拥有Collection接口提供的所有常用方法,又因为List是列表类型,所以List接口还提供了一些适合于自身的常用方法,如表1所示。
表1 List接口定义的常用方法及功能
从表1可以看出,List接口提供的适合于自身的 ......
2008 年 6 月 24 日
原文地址: http://www.ibm.com/developerworks/cn/data/library/techarticles/dm-0806wangys/
本文介绍 IBM FileNet P8 4.0 Platform 提供的 Content Java API。首先对 FileNet P8 Content Engine 和 API 进行概要介绍, 并说明了一些基本概念,随后详细介绍了 FileNet Content Engine提供的基于 EJB ......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Xml;
using System.IO;
using System.Data;
using System.Dat ......
安装完Ubuntu8.1之后,如果想要开发或运行Java程序,就需要安装JDK或JRE。下面就介绍一种最为简便的在Ubuntu中安装JDK
的方法。
众所周知,Sun公司对于Linux下的的JDK安装控制是相当严格:(1)预编译成二进制的JDK包是需要取得Sun公司授权的;(2)Sun公
司有自己的Unix操作系统。或许是因为这两点原因,目前在Linux或U ......