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

XML ÐòÁл¯Ê¾Àý

XML ÐòÁл¯¿ÉÒÔ²ÉÓôӼòµ¥µ½¸´ÔӵĶàÖÖÐÎʽ¡£ÀýÈ磬¿ÉÒÔÐòÁл¯Ö»°üº¬¹«¹²×ֶκ͹«¹²ÊôÐÔµÄÀ࣬Èç XML ÐòÁл¯¼ò½éÖÐËùʾ¡£ÏÂÃæµÄ´úÂëʾÀýÌÖÂÛ¸÷Öָ߼¶·½°¸£¬°üÀ¨ÈçºÎʹÓà XML ÐòÁл¯Éú³É·ûºÏÌØ¶¨ XML ¼Ü¹¹ (XSD) ÎĵµµÄ XML Á÷¡£
ÐòÁл¯Êý¾Ý¼¯
³ýÁËÐòÁл¯¹«¹²ÀàµÄʵÀýÍ⣬»¹¿ÉÐòÁл¯ DataSet µÄʵÀý£¬ÈçÏÂÃæµÄ´úÂëʾÀýËùʾ¡£
private void SerializeDataSet(string filename){
    XmlSerializer ser = new XmlSerializer(typeof(DataSet));
       
    // Creates a DataSet; adds a table, column, and ten rows.
    DataSet ds = new DataSet("myDataSet");
    DataTable t = new DataTable("table1");
    DataColumn c = new DataColumn("thing");
    t.Columns.Add(c);
    ds.Tables.Add(t);
    DataRow r;
    for(int i = 0; i<10;i++){
        r = t.NewRow();
        r[0] = "Thing " + i;
        t.Rows.Add(r);
    }
    TextWriter writer = new StreamWriter(filename);
    ser.Serialize(writer, ds);
    writer.Close();
}
ÐòÁл¯ XmlElement ºÍ XmlNode
»¹¿ÉÐòÁл¯ XmlElement »ò XmlNode ÀàµÄʵÀý
private void SerializeElement(string filename){
XmlSerializer ser = new XmlSerializer(typeof(XmlElement));
XmlElement myElement=
new XmlDocument().CreateElement("MyElement", "ns");
myElement.InnerText = "Hello World";
TextWriter writer = new StreamWriter(filename);
ser.Serialize(writer, myElement);
writer.Close();
}
private void SerializeNode(string filename){
XmlSerializer ser = new XmlSerializer(typeof(XmlNode));
XmlNode myNode= new XmlDocument().
CreateNode(XmlNodeType.Element, "MyNode", "ns");
myNode.InnerText = "Hello Node";
TextWriter writer = new StreamWriter(filename);
ser.Serialize(writer, myNode)


Ïà¹ØÎĵµ£º

XMLÈëÃż¶...

Input.xml-----------
 <?xml version="1.0" encoding="gb2312"?>
<studentList>
<student sex="man">
<name>wgy</name>
<age>23</age>
<tel>12345678</tel>
</student>
<student sex="female">
<name>lemon</name&g ......

[as3¹¤¾ßÀà]XMLÊý¾ÝÖ±½Óת»»³Éas3Àà

ƽʱ×öÓÎÏ·¿ª·¢µÄʱºò£¬ºÜ´ó³Ì¶ÈÉ϶¼»á²ÉÓÃxmlÀ´×öÅäÖÃÎļþ¡£ÓÐʱºòÐèҪдºÜ¶à£¬È»ºóÓÖÐèÒªÒÀ´ÎÈ¥½âÎö¡£Èç¹ûÓÐÒ»¸ö¹¤¾ßÀ´×Ô¶¯½âÎöÿһ¸öxml£¬²¢ÇÒÌáÈ¡³ö×Ô¼ºÐèÒªµÄÊý¾Ý£¬¶àºÃѽ¡£ËùÒÔ͵Á˸öÀÁ£¬Ð´ÁËÒ»¸ö½âÎöÒ»¶¨¸ñʽµÄxmlºÍ½âÎöÀ࣬°ÑÕâ¸ö¸ñʽ¶ª¸ø²ß»®×Ô¼ºÈ¥µ÷ÕûÊý¾ÝÀ²¡£Í¬Ê±×Ô¼ºÕâ±ßÖ»ÐèÒª½ÓÊÜÏֳɵÄÀà
×¢Ò⣬ÕâÀïµÄÖ¸µÄÀ ......

HTML¡¢SHTML¡¢DHTML¡¢XHTML¡¢XMLÇø±ð


HTML £­ Hyper Text Mark-up Language £­ ³¬Îı¾±ê¼ÇÓïÑÔ
     HTML-³¬Îı¾±ê¼ÇÓïÑÔ£¬ÊÇWWWµÄÃèÊöÓïÑÔ¡£Éè¼ÆHTMLÓïÑÔµÄÄ¿µÄÊÇΪÁËÄܰѴæ·ÅÔÚһ̨µçÄÔÖеÄÎı¾»òͼÐÎÓëÁíһ̨µçÄÔÖеÄÎı¾»òͼÐη½±ãµØÁªÏµÔÚÒ»Æð£¬ÐγÉÓлúµÄÕûÌ壬ÈËÃDz»Óÿ¼ÂǾßÌåÐÅÏ¢ÊÇÔÚµ±Ç°µçÄÔÉÏ»¹ÊÇÔÚÍøÂçµÄÆäËüµçÄÔÉÏ¡£ÎÒÃÇÖ» ......

flex ²Ù×÷xml ʵÏÖÔöɾ¸Ä²é

Ïêϸ½éÉÜFlexÖвÙ×÷XML(ÉÏ)
2009Äê12ÔÂ30ÈÕ ÐÇÆÚÈý 12:05
Ò» ÔÚ½éÉÜFlexÖвÙ×÷XML֮ǰ£¬Ê×Ïȼòµ¥½éÉÜÏÂXMLÖеĻù±¾ÊõÓï¡£   
ÔªËØ£ºXMLÖÐÓµÓпªÊ¼±êÇ©ºÍ½áÊø±êÇ©µÄÕâÒ»¿é³ÆÎª“ÔªËØ”   
½Úµã£º°ÑXMLÔªËØÓëÎı¾½áºÏÆðÀ´Í³³ÆÎª½Úµã   
¸ù½Úµã£ºÎ»ÓÚÕû¸öXMLÎÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ