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

c#:Dataset¶ÁÈ¡XMLÎļþ¶¯Ì¬Éú³É²Ëµ¥

Step 1£ºForm1 ÉÏÌí¼ÓÒ»¸öToolStripContainer¿Ø¼þ
Step2£ºÊµÏÖ´úÂë
private void Form2_Load(object sender, EventArgs e)
{
    CMenuEx menu = new CMenuEx();
    string sPath = "D:\\Menu.xml";//xmlµÄÄÚÈÝ
     if (menu.FileExit())
    { 
             menu.LoadAllMenu(sPath, toolStripContainer1);
     }
     else
     { MessageBox.Show("XMLÎļþ¼ÓÔØÊ§°Ü£¡"); }
}
/// <summary>
/// ²Ëµ¥¶ÁÈ¡Àà
/// </summary>
public class CMenuEx
{
    private string _Path;
    /// <summary>
    /// ÉèÖÃXMLÅäÖÃÎļþ·¾¶
    /// </summary>
    public string Path
    {
        get { return _Path; }
        set { _Path = value; }
    }
    /// <summary>
    /// ÅжÏÎļþÊÇ·ñ´æÔÚ
    /// </summary>
    /// <returns>ÎļþÊÇ·ñ´æÔÚ</returns>
    public bool FileExit()
    {
        if (File.Exists(_Path))
        { return true; }
        else return false;
    }
    /// <summary>
    /// ¼ÓÔØ²Ëµ¥
    /// </summary>
    /// <param name="menuStrip">ĸ²Ëµ¥¶ÔÏó</param>
    public void LoadAllMenu(string sXmlPath, ToolStripContainer pToolStripContainer)
    {
        DataSet ds = new DataSet();
        ds.ReadXml(sXmlPath, XmlReadMode.Auto);
    


Ïà¹ØÎĵµ£º

c# asp.net »ñÈ¡¿Í»§¶Ë±íµ¥µÄÊý¾Ý

ÔÚweb³ÌÐòÖУ¬¾­³£»áʹÓÃÔÚÒ»¸öÍøÒ³Ê¹ÓÃÆäËûÍøÒ³Ìá½»µÄÊý¾ÝÐÅÏ¢£¬ÕâÀï¿ÉÒÔʹÓÃRequestÄÚÖöÔÏóÀ´Íê³É£¬À´»ñÈ¡Óû§Ìá½»µÄÐÅÏ¢£¬¸ù¾Ý¿Í»§¶ËÌá½»Êý¾Ý·½Ê½µÄ²»Í¬£¬Request¶ÔÏó·Ö±ðʹÓÃFormºÍQueryString¼¯ºÏÊôÐÔÀ´»ñÈ¡Êý¾Ý¡£ÏÂÃæÊÇÁ½ÖÖ¼¯ºÏ»ñÈ¡·½Ê½µÄ²»Í¬µã£ºÍ¨¹ýForm»ñÈ¡Êý¾ÝʱÔÚformÊôÐÔÖмòµ¥µÄÌí¼Óaction=“Ìø×ªµÄÍøÒ³ ......

Java and XML_¶ÁÊé±Ê¼Ç_2010 5 18

2010-05-18
Îå¡¢ÑéÖ¤XML
l  ÊôÐÔÁËÌØÕ÷·½·¨
·½   ·¨
·µ»ØÀàÐÍ
²Î    Êý
Óï    ·¨
setProperty()
void
String propertyId,
Object value
parser.setProperty(“[Property URI]”,
”[Object parameter]”);
setFeature()
void
String feat ......

JAVA²Ù×÷XMLµÄÍêÕûÀý×Ó——W3C DOMƪ

ÕâÊÇÒ»¸öÓÃJAVA W3C DOM ½øÐÐXML²Ù×÷µÄÀý×Ó£¬°üº¬Á˲éѯ¡¢Ôö¼Ó¡¢Ð޸ġ¢É¾³ý¡¢±£´æµÄ»ù±¾²Ù×÷¡£½ÏÍêÕûµÄÃèÊöÁËÒ»¸öXMLµÄÕû¸ö²Ù×÷Á÷³Ì¡£ÊʺϸÕÈëÃÅJAVA XML²Ù×÷µÄÅóÓѲο¼ºÍѧϰ¡£
¼ÙÉèÓÐXMLÎļþ£ºtest1.xml
<?xml version="1.0" encoding="UTF-8"?>
<books>
 <book>
  <name>¹þÀï²¨Ì ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ