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

DataSet(DataTable)ÓëXML»¥×ª

using System;
using System.Data;
using System.IO;
using System.Xml;
using System.Text;
// ÏàÓ¦C#´úÂ룺
private string ConvertDataTableToXML(DataTable xmlDS)
{
MemoryStream stream = null;
XmlTextWriter writer = null;
try
{
stream = new MemoryStream();
writer = new XmlTextWriter(stream, Encoding.Default);
xmlDS.WriteXml(writer);
int count = (int)stream.Length;
byte[] arr = new byte[count];
stream.Seek(0, SeekOrigin.Begin);
stream.Read(arr, 0, count);
UTF8Encoding utf = new UTF8Encoding();
return utf.GetString(arr).Trim();
}
catch
{
return String.Empty;
}
finally
{
if (writer != null) writer.Close();
}
}
private DataSet ConvertXMLToDataSet(string xmlData)
{
StringReader stream = null;
XmlTextReader reader = null;
try
{
DataSet xmlDS = new DataSet();
stream = new StringReader(xmlData);
reader = new XmlTextReader(stream);
xmlDS.ReadXml(reader);
return xmlDS;
}
catch (Exception ex)
{
string strTest = ex.Message;
return null;
}
finally
{
if (reader != null)
reader.Close();
}
}


Ïà¹ØÎĵµ£º

°Ñxml תdataset

///ͨ¹ý´«ÈëµÄÌض¨XML×Ö·û´®£¬Í¨¹ý ReadXmlº¯Êý¶ÁÈ¡µ½DataSetÖС£
protected static DataSet GetDataSetByXml(string xmlData)
{
           try
           {
       &nbs ......

flash xml ÍêÃÀ½â¾öÖÐÎÄÏÔʾ ת


´ó¼ÒÓ¦¸Ã¶¼ä¯ÀÀ¹ýºÜ¶àflashÕûÕ¾Ô´Â룬flash½áºÏxml´ïµ½Ò»¸ö¶¯Ì¬ÐÞ¸ÄflashÊä³öÄÚÈݵÄЧ¹û£¬ÓÃflashÀ´ÌåÏÖÒ»¸öÍøÕ¾£¬²¢ÇÒÄܼòµ¥µÄ¶¯Ì¬¸üУ¬´ó¶¼ÕâЩԴÂëÊÇÀÏÍâ·Å³öÀ´µÄ£¬ÔÚÊäÈëÊä³ö·½Ã棬¼¸ºõ¶ÔÖÐÎĶ¼²»Ö§³Ö£¬ºÜ¶àºÜìŵÄЧ¹û
ÎÒÃÇÈÏʶ·½¿é×ÖµÄÈ˶¼Óò»ÁË£¨Í»È»¸ÐÎò£¬¼ÆËã»ú´øÀ´µÄ¿Æ¼¼¸ïÃü£¬ÎªÊ²Ã´²»»áÊÇÖйúÈËÄØ£¿¶øÊÇÖ»Ó ......

xml±à³Ì1

Eclipse IBM¿ª·¢³öµÄ¹¤¾ß
step over Ìøµ½µ±Ç°³ÌÐòµÄÏÂÒ»ÐÐ(Ìø¹ý)
step into Ìø½øÈ¥ (ÌøÈë)
step return Ìø³öÀ´ (Ìø³ö)
XML
<a classname="cn.itcast.Person"></a>
<?xml version="1.0"?> ¿Õ¸ñ±ØÐëΪӢÎÄ
×Ö·û±àÂë
<?xml version="1.0" encoding="UTF-8"?>
CDATA -->Character data &nb ......

Java:Struts ÏîÄ¿ÖÐweb.xmlÎļþÅäÖÃ

 web.xmlÎļþ¶ÔÓÚÅäÖÃÈκÎJava WebÓ¦Óö¼±ØÐèµÄ¡£
£¨1£©ÅäÖÃStrutsµÄActionServlet
<servlet><!--ÔªËØÀ´ÉùÃ÷ActionServlet-->
<servlet-name><!--ÔªËØ£ºÓÃÀ´¶¨ÒåServletµÄÃû³Æ-->
<servlet-class><!--ÔªËØ:ÓÃÀ´Ö¸¶¨ServletµÄÍêÕûÀàÃû-->
<servlet>
<servlet-name& ......

xmlÎĵµÀí½â

<!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
        "http://struts.apache.org/dtds/struts-2.0.dtd">
xmlѧϰ£ºhttp://www.w3school.com.cn/x.asp ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ