C#开发XML WebService接口(SOAP)
原文链接:http://www.cnblogs.com/ding0910/archive/2007/07/12/815407.html
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using BX.Interface;
namespace WebService
{
/**//// <summary>
/// Service1 的摘要说明。
/// </summary>
public class doService : System.Web.Services.WebService
{
/**//// <summary>
/// 网上报销系统WebService服务通用调用方法
/// </summary>
/// <param name="ifCode">接口标识</param>
/// <param name="ifPass">校验码</param>
/// <param name="ifEvent">操作方式(可空)</param>
/// <param name="ifInfo">传入的XML信息</param>
/// <returns></returns>
[WebMethod]
public string IfService(string ifCode,string ifPass,string ifEvent,string ifInfo)
{
ifCode = ifCode.Trim();
ifPass = ifPass.Trim();
ifEvent = ifEvent.Trim();
&
相关文档:
使用dom4j解析XML时,要快速获取某个节点的数据,使用XPath是个不错的方法,dom4j的快速手册里也建议使用这种方式,标题都写的这么阔气:Powerful Navigation with XPath,呵呵。
方法是使用Document的selectNodes(String XPath)方法,代码写法:
List l = doc.selectNodes("//COLS/COL1");
执行时却抛出以下异常:
Exc ......
JAVA读XML:sax,dom,jdom,dom4j的比较以及选择(转)
原文:www.hicourt.gov.cn/homepage/show9_content.asp
SAX: ......
#region 得到所有本地网络中可使用的SQL服务器列表
/// <summary>
/// 得到所有本地网络中可使用的SQL服务器列表
/// </summary>
/// <param name="p_strServerList">服务器列表</param& ......
//create a new Document
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document d = db.newDocument();
//add root Node
Element noteuser = d.createElement("note-users");
d.appendChil ......
xml
<mime>
<content>
<type>text/plain</type>
<big>357</big>
<text>D:\\cybercourttext2009101410241364.txt</text>
</content>
<content>
<type>text/plain</type>
<big>357</big>
<text>D:\\cybercourttext2009 ......