xmlÓëdataset£¨datatable£©»¥×ª
	
    
    
	ÒýÓÃÀà¿â£º
 using System;
 using System.Data;
 using System.IO;
 using System.Xml;
using System.Text;
// ÏàÓ¦C#´úÂ룺
    private string ConvertDataTableToXML(DataTable xmlDS)
    {
        MemoryStream stream = null;
        XmlTextWriter writer = null;
        try
        {
            stream = new MemoryStream();
            writer = new XmlTextWriter(stream, Encoding.Default);
            xmlDS.WriteXml(writer);
            int count = (int)stream.Length;
            byte[] arr = new byte[count];
            stream.Seek(0, SeekOrigin.Begin);
            stream.Read(arr, 0, count);
            UTF8Encoding utf = new UTF8Encoding();
            return utf.GetString(arr).Trim();
        }
        catch
        {
            return String.Empty;
        }
        finally
        {
            if (writer != null) writer.Close();
        }
    }
    private DataSet ConvertXMLToDataSet(string xmlData)
    {
      StringReader stream = null;
      XmlTextReader reader = null;
      try
      {
        DataSet xmlDS = new DataSet();
        stream = new StringReader(xmlData);
        reader = new XmlTextReader(stream);
        xmlDS.ReadXml(reader);
        return xmlDS;
      }
      catch (Exception ex)
      {
        string strTest = ex.Message;
        return null;
      }
      finally
      {
        if (reader != null)
        reader.Close();
      }
    } 
    
     
	
	
    
    
	Ïà¹ØÎĵµ£º
        
    
    
Õâ¸öЧ¹ûÓ¦¸Ã²»ËãÊ²Ã´Ï¡Ææ£¬ÍøÉÏÒ²ÓÐÏֳɵĴúÂ룬ÎÒÕâ¸öÒ²Ã»Ê²Ã´ÌØ±ðµÄµØ·½£¬Ö»ÊÇÒòΪÎÒ×Ô¼ºÐ´µÄ£¬Ò²ËãÊÇΪѧϰDOMºóÒ»¸öÁ·Ï°£»ÔÚIEϲâÊÔͨ¹ý£»
ʵÏÖЧ¹ûÊÇÕâÑùµÄ£º
¶ÁÈ¡XMLÎĵµ£»
²ÉÓõݹéÉú³ÉÎÞÏÞ¼¶µÄÊ÷Ðβ˵¥£»
Äܹ»ÏìÓ¦Êó±êʼþ£¬Õ¹¿ªÓë²ðµþ×Ó¼¶²Ëµ¥£»
Ê×ÏÈÊÇÉú³ÉÒ»¸öXMLÎĵµ£¬ÎÒÓõÄÊÇXML SpyµÄ±à¼Æ÷£»
< ......
	
    
        
    
    
ÀûÓÃXPath¶ÁÈ¡XmlÎļþ
Ö®ËùÒÔÒªÒýÈëXPathµÄ¸ÅÄĿµÄ¾ÍÊÇΪÁËÔÚÆ¥ÅäXMLÎĵµ½á¹¹Ê÷ʱÄܹ»×¼È·µØÕÒµ½Ä³Ò»¸ö½ÚµãÔªËØ¡£¿ÉÒÔ°ÑXPath±È×÷Îļþ¹ÜÀí·¾¶£ºÍ¨¹ýÎļþ¹ÜÀí·¾¶£¬¿ÉÒÔ°´ÕÕÒ»¶¨µÄ¹æÔò²éÕÒµ½ËùÐèÒªµÄÎļþ£»Í¬Ñù£¬ÒÀ¾ÝXPathËùÖÆ¶¨µÄ¹æÔò£¬Ò²¿ÉÒԺܷ½±ãµØÕÒµ½XML½á¹¹ÎĵµÊ÷ÖеÄÈκÎÒ»¸ö½Úµã.
¡¡¡¡²»¹ý£¬ÓÉÓÚXPath¿ÉÓ¦Ó ......
	
    
        
    
                
XML¼´extensibe markup languageµÄËõд£¬Ò²¾ÍÊÇ¿ÉÀ©Õ¹±êʶÓïÑÔ¡£ÓÉÓÚÆä¿ª·ÅÐÔ£¬Ô½À´Ô½¶àµÄÈí¼þ²ÉÓÃËü×÷ΪÃèÊöÓïÑÔ£»ÓÉÓÚÆäÆ½Ì¨ÎÞ¹ØÐÔ£¬Ô½À´Ô½¶àµÄϵͳ²ÉÓÃËü×÷ΪÊý¾Ý´«µÝÖн顣¼ÆËã»úÐÐÒµÒѾ°ÑXMLΪÊý¾Ý½»»»µÄ±ê×¼£¬²¢ÌṩÁËÏ൱ÊýÁ¿µÄÖ§³Ö¹¤¾ß¡£µ« ......
	
    
        
    
    var xmlDom;     //XML DOM object
	var xmlFile="ff.xml";    //xml file name
	loadXML = function(fileRoute){
		xmlDoc=null;
		if (window.ActiveXObject){
			xmlDoc = new ActiveXObject('Msxml2.DOMDocument');
			xmlDoc.async=false;
			xmlDoc.load(fileRoute);
		}else if (document.implementation &a ......