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

°ÑÎı¾¿òµÄֵдÈëµ½xmlÎļþÖÐ

 protected void btn_write_Click(object sender, EventArgs e)
    {
        XmlWriterSettings settings=new XmlWriterSettings();
        settings.Indent=true;
        settings.IndentChars=" ";
        using (XmlWriter write = XmlWriter.Create("E:\books.xml",settings))
        {
            write.WriteStartElement("book");
            write.WriteElementString("price", txt_content.Text);
            write.Flush();
        }
}


Ïà¹ØÎĵµ£º

DataTable.Select½øÐÐXMLÊý¾ÝµÄ²éѯ

×î½üÔÚ²©¿ÍÔ°´úÂëµÄÖع¹ÖÐ, ÎÒ·¢¾õÓÃDataTable.Select½øÐÐXMLÊý¾ÝµÄ²éѯҲÊÇͦ·½±ãµÄ¡£
±ÈÈçÎÒÃǸù¾ÝUrlÖвÎÊýÖµ²éѯXMLÊý¾ÝÖÐÏàÓ¦½ÚµãµÄÊý¾Ý¡£
¼ÙÈçÎÒÃÇÓÐÕâÑùµÄXmlÊý¾ÝÎļþCatalog.xml:
<Navigation>
      <Catalog title="·Ç¼¼ÊõÇø" url="default.aspx?cate=2" rss="MainFeed.as ......

Flexµ÷ÓÃÔ¶³ÌXMLÊý¾Ý

Ê×ÏÈÒªÓÐÒ»¸ö¼òÒ׵ķþÎñÆ÷£¬½¨Á¢Ò»¸öÕ¾µã£¬È»ºóÕ¾µãÏ´æ·Å 
1£ºcrossdomain.xml Õâ¸öÊÇ¿çÓëÓò²ßÂÔÎļþ£¬ÓÃÓÚÖ¸¶¨Óòͨ¹ýFlash
Player·ÃÎʱ¾ÓòµÄ×ÊÔ´(Èç¹û·þÎñÆ÷ÔÚ±¾»ú¾ÍûÓÐÕâ¸ö±ØÒª)µ«ÊÇÔ¶³ÌµÄ»°¾ÍÒª(½¨ÒéÒª)
ÎļþÄÚÈÝ£º
<cross-domain-policy>
  <allow-access-from domain="*" /> ......

Jdom ¶ÁÈ¡ xmlÎļþÀý×Ó


Jdom
¶ÁÈ¡
xml
ÎļþÀý×Ó
1.         
ÓÃ
JDOM
¶ÁÈ¡
XML
ÎļþÐèÏÈÓÃ
org.jdom.input.SAXBuilder
¶ÔÏóµÄ
build()
·½·¨´´½¨
Document
¶ÔÏó
,
È»ºóÓÃ
Document
Àà¡¢
Element
ÀàµÈµÄ·½·¨¶ÁÈ¡
1.
Sample1.java
import
java.util.*;
import
org.j ......

XMLÈëÞ«½âÖ®DTD Îļþ¸ñʽ¶¨Òå(XML DTD)

¡¡¡¡DTDʵ¼ÊÉÏ¿ÉÒÔ¿´×÷Ò»¸ö»ò¶à¸öXMLÎļþµÄÄ£°å£¬ÕâЩXMLÎļþÖеÄÔªËØ¡¢ÔªËصÄÊôÐÔ¡¢ÔªËصÄÅÅÁз½Ê½/˳Ðò¡¢ÔªËØÄܹ»°üº¬µÄÄÚÈݵȣ¬¶¼±ØÐë·ûºÏDTDÖеĶ¨Òå¡£XMLÎļþÖеÄÔªËØ£¬¼´ÎÒÃÇËù´´½¨µÄ±ê¼Ç£¬ÊǸù¾ÝÎÒÃÇÓ¦ÓõÄʵ¼ÊÇé¿öÀ´´´½¨µÄ¡£ÏëÒª´´½¨Ò»·ÝÍêÕûÐԸߡ¢ÊÊÓ¦ÐÔ¹ãµÄDTDÊǷdz£À§Äѵģ¬ÒòΪ¸÷Ðи÷Òµ¶¼ÓÐËûÃÇ×Ô¼ºµÄÐÐÒµÌص㣠......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ