Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÀûÓÃSqlHelper(ExecuteXmlReaderʹÓÃ)£¬×ª»»µ½xml¸ñʽ

ÀûÓÃsqlhelperÖеÄExcuteXmlReader·½·¨£¬¶ÁÈ¡Êý¾Ý²¢±£´æΪxmlÎļþ     
 string strConn = Properties.Settings.Default.Connections;
           SqlConnection connection = new SqlConnection(strConn);
         ---×¢Ò⣺ºóÃæµÄfor¸ñʽ
           string strsql = "select * from p where name=@name and other=@other FOR XML AUTO,root('root'),elements";
     
            SqlParameter[] sqlp = new SqlParameter[2];
            sqlp[0] = new SqlParameter("@name", "pp");
            sqlp[1] = new SqlParameter("@other", "ss");
            xr = SqlHelper.ExecuteXmlReader(connection, CommandType.Text, strsql,
               sqlp);
           XmlDocument xml = new XmlDocument();
           xml.Load(xr);
           xml.Save(Application.StartupPath + "\\test1.xml");


Ïà¹ØÎĵµ£º

java ½«EXCEL±í¸ñÊý¾Ýת»»³ÉXML¸ñʽ

ÓÐʱºòÎÒÃÅÐèÒª°ÑEXCEL±í¸ñÖеÄÊý¾Ýת»»³ÉXML¸ñʽ ÕâÐèÒªÓõ½JXL(·ÖÎöEXCEL)°üºÍJDOM°ü(¹¹³ÉXML)
import java.io.*;
import jxl.*;
import org.jdom.Element;
import org.jdom.Document;
import org.jdom.output.XMLOutputter;
/**
 *
 * @author guo
 */
public class EtoX {
    ......

´´½¨×Ô¶¨ÒåÅÅÐòDataGrid¿Ø¼þµÄÀý×Ó(¶ÁÈ¡xml)

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white" viewSourceURL="srcview/index.html">
<mx:S ......

ʹÓÃ.NETÖеÄXML×¢ÊÍ(Ò») XML×¢ÊͱêÇ©½²½â

Ò».ÕªÒª
    .NetÔÊÐí¿ª·¢ÈËÔ±ÔÚÔ´´úÂëÖвåÈëXML×¢ÊÍ£¬ÕâÔÚ¶àÈËЭ×÷¿ª·¢µÄʱºòÏÔµÃÌرðÓÐÓᣠC#½âÎöÆ÷¿ÉÒÔ°Ñ´úÂëÎļþÖеÄÕâЩXML±ê¼ÇÌáÈ¡³öÀ´£¬²¢×÷½øÒ»²½µÄ´¦ÀíΪÍⲿÎĵµ¡£ ÕâƪÎÄÕ½«Õ¹Ê¾ÈçºÎʹÓÃÕâЩXML×¢ÊÍ¡£ ÔÚÏîÄ¿¿ª·¢ÖУ¬ºÜ¶àÈ˲¢²»ÀÖÒâд·±ÔÓµÄÎĵµ¡£µ«ÊÇ£¬¿ª·¢×鳤ϣÍû´úÂë×¢Ê;¡¿ÉÄÜÏêϸ£»ÏîÄ¿ ......

XML CDATA

 
ÔÚXMLÎĵµÖеÄËùÓÐÎı¾¶¼»á±»½âÎöÆ÷½âÎö¡£
Ö»ÓÐÔÚCDATA²¿¼þÖ®ÄÚµÄÎı¾»á±»½âÎöÆ÷ºöÂÔ¡£
½âÎöÊý¾Ý
XML ½âÎöÆ÷ͨ³£Çé¿öÏ»ᴦÀíXMLÎĵµÖеÄËùÓÐÎı¾¡£
µ±XMLÔªËر»½âÎöµÄʱºò£¬XMLÔªËØÄÚ²¿µÄÎı¾Ò²»á±»½âÎö:
<message>This text is also parsed</message>
XML½âÎöÆ÷ÕâÑù×öµÄÔ­ÒòÊÇXMLÔªËØÄÚ²¿¿ÉÄÜ» ......

asp.net ¶ÔxmlÎļþµÄ¶Áд,Ìí¼Ó,ÐÞ¸Ä,ɾ³ý²Ù×÷

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;
private XmlDo ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ