°Ñxml תdataset
///ͨ¹ý´«ÈëµÄÌØ¶¨XML×Ö·û´®£¬Í¨¹ý ReadXmlº¯Êý¶ÁÈ¡µ½DataSetÖС£
protected static DataSet GetDataSetByXml(string xmlData)
{
try
{
DataSet ds = new DataSet();
using (StringReader xmlSR = new StringReader(xmlData))
{
ds.ReadXml(xmlSR, XmlReadMode.InferTypedSchema); //ºöÊÓÈκÎÄÚÁª¼Ü¹¹£¬´ÓÊý¾ÝÍÆ¶Ï³öÇ¿ÀàÐͼܹ¹²¢¼ÓÔØÊý¾Ý¡£Èç¹ûÎÞ·¨Íƶϣ¬Ôò½âÊͳÉ×Ö·û´®Êý¾Ý
if (ds.Tables.Count > 0)
{
return ds;
}
}
return null;
}
catch (Exception)
{
return null;
}
}
/// ͨ¹ý´«ÈëµÄxmlÎļþ·¾¶(º¬ÎļþÃû),½«¸ñʽ»¯µÄXmlÎļþ×Ô¶¯¶Áȡת»»ÎªDataSet¡£
public s
Ïà¹ØÎĵµ£º
ArrayAdapter adapter =
ArrayAdapter.createfromResource(
this,
R.array.catalog,
android.R.layout.simple_list_item_1);
this.setListAdapter(adapter);
xmlÎļþ
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name= ......
XMLÊÇÒ»ÏîÈÈÃŵļ¼Êõ¡£ËüÖ®ËùÒÔÄܹ»ÒýÆðÈËÃǵÄÐËȤ£¬Ò»¸öÖ÷ÒªµÄÔÒòÔÚÓÚËüÊ®·ÖµÄ¼òµ¥£¬ÈËÃÇ¿ÉÒÔºÜÈÝÒ×µØÀí½âºÍʹÓÃËü¡£Ã¿Ò»¸ö³ÌÐòÔ±¶¼ÄÜÇáÒ׵ؿ´¶®Ò»¸öXMLÎļþ£¬Àí½âËü°üº¬µÄÄÚÈÝ¡£
.NETÖаüº¬Á˺ܶàÖ§³ÖXMLµÄÀ࣬ÕâЩÀàʹµÃ³ÌÐòԱʹÓÃXML±à³Ì¾ÍÈçͬÀí½âXMLÎļþÒ»Ñù¼òµ¥¡£ÔÚÕâÆªÎÄÕÂÖУ¬ÎÒ½«¸ø³öÕâÑùµÄÒ»¸öÀàµÄʹÓÃʾÀý£¬Õ ......
1.¶ÁÈ¡XMLÎļþµÄÀࣺ
public class XMLUtils {
private final String DB_XML_FILE = "/XMLSetting.xml";
public Properties getPropertiesfromXML() {
URL url = XMLUtils.class.getResource(dBXMLFILE);
URI uri;
try {
uri = url.toURI();
InputSource xmlfile = new InputSource(uri.g ......
1.books.html
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title ......