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

¶ÁÈ¡ XMLÀà (XmlHelper)

using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
namespace System.Bwch.XmlConfig
{
/**////
/// ¶ÁÈ¡XMLÅäÖÃÎļþÀà
///
public class XmlHelper
{
private string strXmlPath = ""; //XmlÎĵµÂ·¾¶
private XmlDocument xmlDoc; //XMLÎĵµ
/**////
/// ³õʼ»¯ReadXmlÀà
///
/// XMLÎļþ·¾¶
public XmlHelper(string XMLPath)
{
if (!System.IO.File.Exists(XMLPath))
{
throw new Exception("ûÓÐÕÒµ½Ö¸¶¨µÄ·¾¶£º" + XMLPath + "µÄXMLÎĵµ");
}
strXmlPath = XMLPath;
xmlDoc = new XmlDocument();
xmlDoc.Load(XMLPath);
}
/**////
/// ¶ÁÈ¡XMLÎļþÖ¸¶¨¼üÖµµÄvalue Öµ
///
/// ¼üÖµµÄ·¾¶,¸ñʽΪ(¸ù½Úµã/½Úµã/×Ó½Úµã)
/// Ö¸¶¨¼üÖµµÄÊôÐÔÃû³Æ
/// valueÖµ
public string ReadXmlValue(string XMLNodePath,string valueName)
{
try
{
XmlElement xml = (XmlElement)xmlDoc.SelectSingleNode(XMLNodePath);
return xml.GetAttribute(valueName);
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}
/**////
/// дXMLÖ¸¶¨½ÚµãµÄÊôÐÔ
///
/// ¼üֵ·¾¶£¬¸ñʽΪ((¸ù½Úµã/½Úµã/×Ó½Úµã))
/// ÊôÐÔÃû³Æ
/// ÊôÐÔ
///
public bool WriteXmlValue(string XmlNodePath,string valueName, string Value)
{
try
{
XmlElement xml = (XmlElement)xmlDoc.SelectSingleNode(XmlNodePath);
xml.SetAttribute(valueName, Value); //ÉèÖÃ
xmlDoc.Save(strXmlPath); //±£´æ
return true;
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}
/**//


Ïà¹ØÎĵµ£º

xmlÎļþ½á¹¹

Ò»¸öXMLÎļþͨ³£°üº¬ÎļþÍ·ºÍÎļþÌåÁ½´ó²¿·Ö
1.     ÎļþÍ·
XMLÎļþÍ·ÓÉXMLÉùÃ÷ÓëDTDÎļþÀàÐÍÉùÃ÷×é³É¡£ÆäÖÐDTDÎļþÀàÐÍÉùÃ÷ÊÇ¿ÉÒÔȱÉٵ쬹ØÓÚDTDÉùÃ÷½«ÔÚºóÐøµÄÄÚÈÝÖнéÉÜ£¬¶øXMLÉùÃ÷ÊDZØÐëÒªÓеģ¬ÒÔʹÎļþ·ûºÏXMLµÄ±ê×¼¹æ¸ñ¡£
ÔÚÇ°ÃæµÄFlowers.xmlÎļþÖеĵÚÒ»ÐдúÂ뼴ΪXMLÉùÃ÷£º
<?xml °æ ......

phpÊý¾Ý¿âµ¼³öÀà µ¼³öJSON,XML,WORD,EXCEL

from£ºhttp://www.xland.com.cn/article/7/81/0804/28778.htm
±¾ÀàʵÏÖ£º
Êý¾Ý¿âÐÅÏ¢µ¼³ö£ºword£¬excel£¬json£¬xml£¬sql
Êý¾Ý¿â»Ö¸´£º´Ósql£¬´ÓÎļþ
¾ßÌåÓ÷¨:
Ê×ÏÈн¨²âÊÔÓÃÊý¾Ý¿âmytest£¬È»ºóÔÚÀïÃæ½¨Õűí
PHP´úÂë:
ÒÔÏÂÊÇ´úÂëÆ¬¶Î£º
--
-- ±íµÄ½á¹¹ `test`
--
CREATE TABLE `test` (
   `id ......

java ×Ô¼º×öµÄ¶ÔXMLÎļþµÄ¶Áд²Ù×÷

XMLÎļþʵÀý£º
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Context>
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Resource auth="Container" maxActive="20" name="sss" password="123"
type="javax.sql.DataSource" />
<Resource auth="Container" ......

asp.net+jquery+xmlʵÏÖ×î¼òµ¥µÄÁÄÌìÊÒ

×î½üÔÚsina¿´nbaµÄÎÄ×ÖÖ±²¥µÄʱºò£¬¶ÔÍøÕ¾ÓÒϽǵÄÄÇÒ»¸öÁÄÌì´°¿Ú²úÉúÐËȤ£¬¾Í¾ö¶¨×Ô¼ºÒ²×öÒ»¸ö¡£
    ÉÏÍø²é²é×ÊÁÏ£¬ÕâÑùµÄÁÄÌìÊÒÎ޷ǾÍÊÇÓû§ÊäÈëÊý¾Ý´«µ½·þÎñÆ÷±£´æ£¬È»ºóÓû§Ò³ÃæÔÙʵʱµØ´ÓÊý¾Ý¿âÈ¡³öÊý¾Ý£¬ÏÔʾÔÚÒ³ÃæÉÏ£¬¼´¿ÉÍê³ÉÒ»´ÎÁÄÌì²Ù×÷¡£
   Ê×ÏÈÎÒ¶¨ÒåÁËÒ»¸öxmlÎļþ£¬ÓÃÓÚ±£´æÓû§ ......

XML ¸ñʽ

ÏÖÔÚÎÒÃÇÔÝÇÒʹÓÓ¼Çʱ¾”À´´´½¨ÎÒÃǵÄXMLÎļþ°É¡£ÏÈ¿´Ò»¸öXMLÎļþ£º 
¡¡¡¡Àý1 
¡¡¡¡¡´?xml version="1.0" encoding="gb2312" ?¡µ 
¡¡¡¡¡´²Î¿¼×ÊÁÏ¡µ 
¡¡¡¡ ¡´Êé¼®¡µ 
¡¡¡¡ ¡´Ãû³Æ¡µXMLÈëÞ«½â¡´/Ãû³Æ¡µ 
¡¡¡¡ ¡´×÷Õß¡µÕÅÈý¡´/×÷Õß¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ