AndroidÅÄÕÕÉÏ´«³ÌÐòµÄxmlÅäÖÃÎļþ
1. login_window.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bg_logo"
>
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:text="@string/user_name"
/>
<EditText
android:id="@+id/username"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:scrollHorizontally="true"
android:autoText="false"
android:text="user"
android:capitalize="none"
android:gravity="fill_horizontal"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:text="@string/user_passwd" />
<EditText android:id="@+id/userpasswd"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:scrollHorizontally="true"
android:autoText="false"
android:text="user"
android:capitalize="none"
android:gravity="fill_horizontal"
android:password="true"
android:textAppearance="?android:attr/textAppearanceMedium" />
<CheckBox android:id="@+id/cbx_cmwap"
android:text="CMWAP"
android:checked="false"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:layout_width="wrap_content"
android:layout_height="wrap_conten
Ïà¹ØÎĵµ£º
CollectionÖ÷ÒªÊÇÖ¸ÏñArray, ArrayList, List, Dictionary, HashTableÕâЩÊý¾ÝÀàÐÍ£¬´ó¼ÒƽʱÓõĺܶࡣÈç¹ûÒ»¸öÀàÖÐÓÐÒ»¸öCollectionÀàÐ͵ijÉÔ±£¬ÔÚ¶ÔÕâ¸öÀà½øÐÐXMLÐòÁл¯µÄʱºò£¬Ó¦¸ÃÈçºÎ´¦Àí£¿Ó¦¸Ã˵ÔÚ.netµ±ÖÐÕâÊDZȽϼòµ¥µÄ£¬Ö»Òª½¨Á¢Ò»¸öXmlSerializerÀà¾Í¿ÉÒÔ°ïÄã×Ô¶¯¸ã¶¨£¬²»¹ýÓеÄʱºòÄã¿ÉÄÜÐèÒª¶Ô×Ô¶¯µÄÐòÁл¯¹ý³ ......
½âÎö£º
CMarkup xml;
CString strChanText, strChanType;
xml.Load("MyXml.xml");
xml.ResetMainPos();
if (!Chan.FindElem("TreeOrg"))
{
return;
}
if (xml.IntoElem())
{
xml.FindEle ......
µÚÒ»²½:½«XML±à¼Æ÷ÉèÖÃĬÈÏΪMyeclipse edit
window__Preferences__General____Editors_____File Associations
ÕÒµ½*.xml,Ñ¡ÔñMyeclipse Xml editor,µãdefault
µÚ¶þ²½:ÅäÖÃdtd»òÕßxsdÎļþ
Window → Preferences... → MyEclipse → Files & Editors → ......
ÊÕ²Ø
ÎÒÔøÔÚÇ°Ãæ½éÉܹýÒ»¸ö¿ÉÓÃÓÚBREW»·¾³ÏµÄXML Parser£¬½ñÌìÏë·ÖÏíµÄÊÇÈçºÎÔÚSymbianƽ̨ÉϽâÎöXMLÎļþ£¬²»ÐèÒªµÚÈý·½µÄ¶«Î÷£¬SymbianÒѾΪÎÒÃÇÌṩÁËÕâ¸öÀàCParser¡£
ÍøÉÏÒ²ÓÐÕâ·½ÃæµÄ×ÊÁÏ£¬½¨Òé²Î¿¼£º
http://wiki.forum.nokia.com/index.php/How_to_parse_XML_file_using_CParser_class
²»¹ý£¬Òª×¢ÒâµÄÊÇSymbia ......