C# ²Ù×÷XML£¬×Ô¼ºÓùýµÄ´úÂ룬¿ÉÄÜÖ»ÓÐÎÒÄÜ¿´¶®
public string WriteXML(string[] values, int flag)
{
//Èç¹ûflag==0ÔòΪµÚÒ»´ÎÔËÐÐÐèÒª³õʼ»¯XMLÎļþ
if (flag == 0)
{
//ÉúÔÚËæ»úÎļþÃû
string dateName = System.DateTime.Now.ToString("yyyyMMddHHmmss");
string newFileName = Session["orgid"].ToString() + "_" + Session["DeptID"].ToString() + "_" + Session["UserID"].ToString() + "_" + dateName;
string PersonalFolder = Server.MapPath(@"~/offline/" + Session["OrgID"].ToString() + "_" + Session["DeptID"].ToString() + "_" + Session["UserID"].ToString() + "/" + DateTime.Now.ToString("yyyy-MM-dd HH_mm_ss"));
if (!Directory.Exists(PersonalFolder))
{
Directory.CreateDirectory(PersonalFolder);
}
//Directory.SetAccessControl(PersonalFolder, System.Security.AccessControl.DirectorySecurity);
string file = PersonalFolder + "\\" + newFileName + ".xml";
Session["PersonalFolder"] = PersonalFolder;
Session["file"] = file;
#region ´´½¨Îļþ
StreamWriter sw = File.CreateText(file);
sw.WriteLine("<?xml version=\"1.0\" encoding=\"utf-8\" ?>");
sw.WriteLine("<ChkQuaran UserID=\"\" UserName=\"\" DeptID=\"\" OrgID=\"\" RoleID=\"\">");
//sw.WriteLine("<ChkInfo>");
sw.WriteLine();
//sw.WriteLine("</ChkInfo>");
sw.WriteLine("</ChkQuaran>");
sw.Close();
sw.Dispose();
#endregion
#region ²åÈëÓû§ÐÅÏ¢
XMLDataBase.XMLCommen xmlHelper = new XMLDataBase.XMLCommen(file);
xmlHelper.UpdateAttr("ChkQuaran", "UserID", Session["Userid"].ToString());
xmlHelper.UpdateAttr("ChkQuaran", "UserName", Session["UserName"].ToString());
Ïà¹ØÎĵµ£º
µ±Ò³ÃæÔØÈëʱ£¬»áÖ´ÐÐλÓÚ body ²¿·ÖµÄ JavaScript¡£
µ±±»µ÷ÓÃʱ£¬Î»ÓÚ head ²¿·ÖµÄ JavaScript ²Å»á±»Ö´ÐС£
2006Äê1ÔÂ14ÈÕ£¬John Resig ÔÚBarCampNYCÉϵÚÒ»´Î·¢²¼ÁËjQuery¡£
JSON(JavaScript Object Notation) ÊÇÒ»ÖÖÇáÁ¿¼¶µÄÊý¾Ý½»»»¸ñʽ¡£Ò×ÓÚÈËÔĶÁºÍ±àд¡£Í¬Ê±Ò²Ò×ÓÚ»úÆ÷½âÎöºÍÉú³É¡£Ëü»ùÓÚJavaScript£¨St ......
ÔÚC#.netÖÐÈçºÎ²Ù×÷XML
ÔÚC#.netÖÐÈçºÎ²Ù×÷XML
¿ÉÄܺܶàÅóÓÑ»¹Ã»ÓнøÐйýXML²Ù×÷,Ï£ÍûÏÂÃæÕâƪÎÄÕÂÄܶԴó¼ÒÓаïÖú.»òÕß×Ô¼º¸´ÖÆһϴúÂëÊÔÒ»ÏÂ.ÕâƪÎÄÕ²»ÊÇÎÒдµÄ.ÎÒÖ»ÊÇת¹ýÀ´.¾õµÃ²»´í.
ÐèÒªÌí¼ÓµÄÃüÃû¿Õ¼ä£º
using System.Xml;
¶¨Ò弸¸ö¹«¹²¶ÔÏó£º
XmlDocument xmldoc ;
XmlNode xmlnode ;
XmlElement xmlele ......
1¡¢C/C++³ÌÐòÔ±Çë×¢Ò⣬²»ÄÜÔÚcaseÓï¾ä²»Îª¿Õʱ“ÏòÏÂÖ´ÐД¡£
2¡¢ÖµÀàÐͺÍÒýÓÃÀàÐÍÖ®¼äµÄÇø±ð£ºC#µÄ»ù±¾ÀàÐÍ£¨int£¬charµÈ£©¶¼ÊÇÖµÀàÐÍ£¬ÊÇÔÚÕ»Öд´½¨µÄ¡£¶ø¶ÔÏóÊÇÒýÓÃÀàÐÍ£¬´´½¨ÓÚ¶ÑÖУ¬ÐèҪʹÓùؼü×Önew¡£
3¡¢ÔÚC#ÖÐͨ¹ýʵÀý·ÃÎʾ²Ì¬·½·¨»ò³ÉÔ±±äÁ¿ÊDz»ºÏ·¨µÄ£¬»áÉú³É±àÒëÆ÷´íÎó¡£µ«ÊÇÎÒÃÇ¿ÉÒÔͨ¹ýÉùÃ÷ËûÃÇ ......
Javaͨ¹ýXML SchemaУÑéXML
XMLµÄУÑéÔÚXML´¦ÀíÖзdz£³£¼û£¬Èç¹ûûÓÐÓÐЧµÄ°ì·¨À´Ð£ÑéXMLµÄºÏ·¨ÐÔ£¬ÍùÍù»áµ¼ÖºܶàÎÊÌâ¡£
XMLµÄУÑéÊÇͨ¹ýXML Schema£¨XSD£© »òDTDÎļþµÄÓï·¨¹æ·¶À´Ð£ÑéµÄ¡£DTDÏÖÔÚÔ½À´Ô½²»ÊÜ»¶ÓÁË£¬ÔÚ´ËÑ¡ÓÃXSDÀ´Ð£Ñé¡£
JavaУÑéXMLÊǼþºÍ³¶µµÄÊÂÇ飬ÒòΪSunµÄXMLÏà¹ØÈí¼þ°ü» ......