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

IsolatedStorageFile ±¾µØÊý¾Ý»º´æ xml dataset ¶Áд

IsolatedStorageFile£º°üº¬ÎļþºÍÊý¾ÝµÄ¶ÀÁ¢´æ´¢Çø
datasetÊý¾Ý´æ´¢µ½±¾µØxmlÎĵµ£¬´úÂë´¦ÀíÈçÏÂ
public static void WriteDataToXML(DataSet dataset, string dataname)
{
try
{
IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForAssembly(); // »ñÈ¡Óëµ÷ÓôúÂëµÄ³ÌÐò¼¯±êʶ¶ÔÓ¦µÄÓû§·¶Î§µÄ¶ÀÁ¢´æ´¢
string fileName = "";
fileName = dataname.ToUpper() + ".xml";
using (IsolatedStorageFileStream isoStream = new IsolatedStorageFileStream(fileName, FileMode.Create, isoStore))
{
using (StreamWriter writer = new StreamWriter(isoStream))
{
dataset.WriteXml(writer, XmlWriteMode.WriteSchema);
}
}
}
catch
{ }

Ïà¶ÔÓ¦µÄ´¦Àí·½Ê½Îª£º°´ÕÕ¸ø¶¨µÄÎļþÃû³Æ£¨xml£©¶ÁÈ¡Êý¾Ýµ½µ±Ç°µÄdatasetÖÐÒÔ±¸ºóÐøµÄÊý¾Ý²Ù×÷´¦Àí
´úÂëÈçÏ£º
public static void ReadDatafromXML(DataSet dataset, string dataname)
{
try
{
IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForAssembly();
string fileName = "";
fileName = dataname.ToUpper() + ".xml";
if (IsolatedStorageFile.GetUserStoreForAssembly().GetFileNames(fileName).Length == 0)
{
dataset = null;
}
else
{
using (IsolatedStorageFileStream isoStream = new IsolatedStorageFileStream(fileName, FileMode.Open, isoStore))
{
using (StreamReader reader = new StreamReader(isoStream))
{
dataset.ReadXml(reader, XmlReadMode.ReadSchema);
}
}
}
}
catch
{ }


Ïà¹ØÎĵµ£º

XML´´½¨Ð½áµã

private void CreateNewXmlNode()
{
String strFileName = string.Empty;
strFileName = this.strCurrentPath + "System.xml";
XmlDocument xmlDoc = new XmlDocument();
try
{
xmlDoc.Load(strFileName);
......

XMLÐòÁл¯(Ò»)

MSDNÉϵĶ¨Ò壺
XML ÐòÁл¯½«¶ÔÏóµÄ¹«¹²×ֶκÍÊôÐÔ»òÕß·½·¨µÄ²ÎÊýºÍ·µ»Øֵת»»£¨ÐòÁл¯£©Îª·ûºÏÌض¨ XML ¼Ü¹¹¶¨ÒåÓïÑÔ (XSD) ÎĵµµÄ XML Á÷¡£XML ÐòÁл¯Éú³ÉÇ¿ÀàÐ͵ÄÀ࣬²¢Îª´æ´¢»ò´«ÊäÄ¿µÄ½«Æ乫¹²ÊôÐÔºÍ×Ö¶Îת»»ÎªÐòÁиñʽ£¨ÔÚ´ËÇé¿öÏÂΪ XML)¼òµ¥µÄ˵¾ÍÊǽ«Ò»¸ö¶ÔÏóת»»³ÉXMLÁ÷»òÊÇÎļþµÄ¹ý³Ì¡£
×¢ÒâÊÂÏҪÐòÁл¯µÄÀ ......

ÔÚpythonÖд¦ÀíXML×ܽá

±¾ÎÄ×ܽáÁËÔÚPythonÖÐÖ÷ÒªµÄ¼¸ÖÖ´¦ÀíXMLµÄ·½·¨£º
Element Tree
SAX
Dom
ʹÓõÚÈý·½Àà¿âÈçAmara 2.x£¬ libxml2dom µÈ
Element Tree
Element TreeÊÇPython 2.5ÒýÈëµÄʹÓüòµ¥£¬¿ì½ÝµÄ´¦Àí·½·¨£¬ Ò²ÊÇPython±ê×¼Àà¿âÍƼöµÄ´¦ÀíXMLµÄ·½·¨¡£
ËüʹÓÃÊ÷ÐνڵãµÄÐÎʽÀ´¶ÁдXML¡£Element TreeÊÇÇáÁ¿¼¶µÄDOM£¬ ËùÒÔÊ ......

java,document,xml½âÊÍ

1.½âÊÍ
ÒòΪjspÓõ½ÁËSiteDataÀ࣬¶øSiteData¼Ì³ÐBasePageÀ࣬
ËùÒÔBasePage¹¹Ô캯Êý
BasePage¹¹Ô캯Êý
initializeByCityCodeº¯Êýmain
keyµÄÖµmain.UpImages
vµÄÖµmain.UpImages
2.Ö´ÐÐÍê BasePage.java
ÖеÄinitCommon()ºó£¬
Ìøµ½SiteData.java ÖеĠ process();·½·¨£¬
 public SiteData(HttpServletR ......

Android xml¶Áд


Android ÊÇÕë¶ÔÒƶ¯É豸µÄÒ»ÖÖÐÂÐ˵ĿªÔ´²Ù×÷ϵͳºÍ SDK¡£½èÖúËü£¬Äú¿ÉÒÔ´´½¨¹¦ÄÜÇ¿´óµÄÒƶ¯Ó¦ÓóÌÐò¡£µ±ÄúµÄÓ¦ÓóÌÐò¿ÉÒÔ·ÃÎÊ Web ·þÎñʱ£¬ÆäÎüÒýÁ¦»á´ó´óÔö¼Ó£¬ÕâÒâζ×ÅÄúÐèҪʹÓà Web ÓïÑÔ£ºXML¡£ÔÚ±¾ÎÄÖУ¬Äú½«Á˽âÔÚ Android ÉÏʹÓà XML µÄ²»Í¬·½·¨£¬ÒÔ¼°ÈçºÎʹÓÃËüÃǹ¹½¨×Ô¼ºµÄ Android Ó¦ÓóÌÐò¡£
ÈëÃÅ
ÔÚ±¾ÎÄÖÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ