xmlµÄ¼òµ¥²Ù×÷
ÔںܶàÇé¿öÏÂ, ÎÒÃÇ»áÓõ½XML,±ÈÈç˵ÅäÖÃÎļþµÈ.C#ÌṩÁËXMLÀà.
ÕâÀïÎÒÖ»ÊǼòµ¥µÄдһÏÂXMLÎļþµÄÉú³É,½âÎö¾Í²»¶à˵ÁË.
µÚÒ»ÖÖ·½·¨
DataBase db = DataBaseFactory.CreateDataBase(DataBaseType.MySql, strMysql);
DbCommand command = db.GetSqlStringCommand(strSql);
DataTable dt = db.ExecuteDataSet(command).Tables[0];
//string strFileName = Application.StartupPath + "\\" + "test.xml";
DirectoryInfo file = new DirectoryInfo(strPath);
if (!file.Exists)
{
file.Create();
}
string strFileName = strPath + "\\tech.xml";
XmlDocument oXmlDocument = new XmlDocument();
XmlDeclaration xde;
xde = oXmlDocument.CreateXmlDeclaration("1.0", null, null);
xde.Encoding = "gb2312";
xde.Standalone = "yes";
oXmlDocument.AppendChild(xde);
XmlElement xe = oXmlDocument.CreateElement("Root");
//XmlNode root = oX
Ïà¹ØÎĵµ£º
ת£ºhttp://hi.baidu.com/oneshotonekill/blog/item/be68b513f7c929d7f6039e1e.html
Whitespace is not allowed before an XML Processing Instruction (< ? ... ?>). HTMLComponent.EclipseÔÚ±à¼mxmlµÄʱºòÌáʾÕâÑùµÄ´íÎó¡£¼ì²é²Å·¢ÏÖ´úÂëÖÐÔÚ<? ?>֮ǰ´æÔÚ¿Õ¸ñ¡£ ......
SQL Server 2005ΪXMLÌṩ±¾µØÖ§³Ö;ÏÖÔÚ¿ÉÒÔÔÚOPENXML½ÚµãÖÐʹÓÃÒ»¸ö´øÓÐnodes()º¯ÊýµÄXML×Ö¶ÎÀàÐͰÑÒ»¸öXMLÎļþת»¯ÎªÒ»¸öÐм¯¡£ÈÃÎÒÃÇÀ´¿´Ò»¸öʹÓÃOPENXMLµÄ¼òµ¥Àý×Ó£¬²¢ÏÔʾÈçºÎ°ÑËüת»¯ÎªÔÚSQL Server 2005ÖÐʹÓÃXML×Ö¶ÎÀàÐͺÍnodes()º¯Êý¡£
¡¡¡¡ÎªÁËʹÎÒÃǵÄÀý×Ó¼òµ¥»¯£¬ÎÒÃǽ«¼ÙÉèÎÒÃÇÐèÒªÖ´ÐÐijÖÖ»ùÓڲɹº¶©µ¥ÁÐ±íµ ......
1£® ÏÂÔØÓë°²×°
dom4jÊÇsourceforge.netÉϵÄÒ»¸ö¿ªÔ´ÏîÄ¿£¬Ö÷ÒªÓÃÓÚ¶ÔXMLµÄ½âÎö¡£´Ó2001Äê7Ô·¢²¼µÚÒ»°æÒÔÀ´£¬ÒÑÂ½ÐøÍÆ³ö¶à¸ö°æ±¾£¬Ä¿Ç°×î¸ß°æ±¾Îª1.5¡£
dom4jרÃÅÕë¶ÔJava¿ª·¢£¬Ê¹ÓÃÆðÀ´·Ç³£¼òµ¥¡¢Ö±¹Û£¬ ......
XML ×÷ΪÊý¾ÝÔ´µÄʵÀý£¨TESTED£©
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" preinitialize="preInit()" fontSize="12" height="500">
<mx:Script>
  ......