xmlת»»Îªdataset
/// <summary>
/// ¶ÁÈ¡Êý¾Ý¼¯²¢¼ÓÈ뻺´æ
/// sea 2009-12-11
/// </summary>
/// <returns>½á¹û¼¯</returns>
private DataSet BindData()
{
if (Cache["ds"] == null)
{
XmlDocument xdoc = new XmlDocument();
xdoc.LoadXml(Service.TicketCancel.GetTicketCancel());
DataSet ds = CreatDataSet();
XmlNodeList xlist = xdoc.SelectSingleNode("/JIT-Cancel-Response").ChildNodes;
foreach (XmlNode xnode in xlist)
{
DataRow dr = ds.Tables[0].NewRow();
dr["id"] = xnode.Attributes["id"].Value;
dr["AirlineCompanyC"] = xnode.Attributes["AirlineCompanyC"].Value;
 
Ïà¹ØÎĵµ£º
xmlÎļþ
£¼?xml version="1.0" encoding="GB2312"?£¾
£¼RESULT£¾
£¼VALUE£¾
¡¡¡¡ £¼NO£¾A1234£¼/NO£¾
¡¡¡¡ £¼ADDR£¾ËÄ´¨Ê¡XXÏØXXÕòXX·X¶ÎXXºÅ£¼/ADDR£¾
£¼/VALUE£¾
£¼VALUE£¾
¡¡¡¡ £¼NO£¾B1234£¼/NO£¾
¡¡ ¡¡£¼ADDR£¾ËÄ´¨Ê¡XXÊÐXXÏçXX´åXX×飼/ADDR£¾
£¼/VALUE£¾
£¼/RESULT£¾
ÐèҪʲô°ü×Ô¼ºµ½ÍøÉÏ ......
ÔÚ¹¤×÷Öо³£Óöµ½µ½ÁíÍâÒ»¸ö·þÎñÆ÷¶ÁÈ¡Êý¾Ý£¬ÆäÖÐÒ»ÖÖ×î³£Óõķ½·¨£¬¾ÍÊÇÓÃxml½øÐÐÊý¾Ý´«µÝ£¬±ÈÈçA·þÎñÆ÷µ½B·þÎñÆ÷µÃµ½¶ÔÓ¦µÄxml¸ñʽµÄÊý¾Ý£¬AµÃµ½Ö®ºó½øÐнâÎö¡£Ò»°ãÕâÖÖ½âÎö·ÖΪDOM½âÎöºÍSAX½âÎö¡£ÕâÀï²»ÊÇ̽ÌÖDOMÓëSAX½âÎöµÄÇø±ðºÍÓŵ㣬ֻÊǽéÉÜÒ»¸öС¿ò¼Ü£¬ÊµÏÖJAVABeanºÍXMLµÄת»»£¬Éµ¹ÏʽµÄת»»¡£----- ......
ʹÓÃSAXReaderÐèÒªµ¼Èëdom4j-full.jar°ü¡£
dom4jÊÇÒ»¸öJavaµÄXML API£¬ÀàËÆÓÚjdom£¬ÓÃÀ´¶ÁдXMLÎļþµÄ¡£dom4jÊÇÒ»¸ö·Ç³£·Ç³£ÓÅÐãµÄJava XML API£¬¾ßÓÐÐÔÄÜÓÅÒì¡¢¹¦ÄÜÇ¿´óºÍ¼«¶ËÒ×ÓÃʹÓõÄÌص㣬ͬʱËüÒ²ÊÇÒ»¸ö¿ª·ÅÔ´´úÂëµÄÈí¼þ£¬¿ÉÒÔÔÚSourceForgeÉÏÕÒµ½Ëü¡£
&n ......
ÔÚ×öÒ»°ãµÄXMLÊý¾Ý½»»»¹ý³ÌÖУ¬ÎÒ¸üÀÖÒâ´«µÝXML×Ö·û´®£¬¶ø²»ÊǸñʽ»¯µÄXML Document¡£Õâ¾ÍÉæ¼°µ½XML×Ö·û´®ºÍXml DocumentµÄת»»ÎÊÌ⣬˵°×ÁËÕâÊǸöºÜ¼òµ¥µÄÎÊÌ⣬±¾Îľ͸÷ÖÖXML½âÎöÆ÷·Ö±ðÁоÙÈçÏ£¬ÒÔ·½±ã×Ô¼º½ñºó²éÔÄ¡£
Ò»¡¢Ê¹ÓÃ×îÔʼµÄjavax.xml.parsers£¬±ê×¼µÄjdk api
// ×Ö·û´®×ªXML
String xmlStr = "......";
S ......
¿ÉÄÜÄúÒѾÌý˵ÁË£¬±¾ÖÜÊÇ Microsoft ÊÂÒµ²¿ºÜ¹Ø¼üµÄÒ»ÖÜ¡£ÔÚ±¾ÖÜÔçЩʱºò£¬ÎÒÃÇÐû²¼½«¹«¿ª·¢ÐÐ Microsoft Office 2010 Beta¡£ÄúÊÇ·ñÔøÏ£ÍûÓëÍŶÓÒ»ÆðÔÚ Word Öй²Í¬´´×÷Ò»·ÝÎĵµ£¿ÄúÊÇ·ñÔøÏ£ÍûÔÚ Excel ÖÐͬʱ·ÖÎö³É¶ÑµÄÊý¾Ý£¿»òÕßÔÚ PowerPoint ÑÝʾÎĸåÖÐÍ»ÆƶàýÌåµÄÏÞÖÆ£¿ÄÇô£¬¸Ï¿ìÊÔÊÔ Beta °æ±¾°É¡£
¶ÔÓÚ±ê×¼ÉçÇø£ ......