.netÖÐXMLÎļþ×÷ΪÊý¾ÝÔ´µÄ²Ù×÷Àà
²»½âÊÍÁË£¬×Ô¼º¿´´úÂë°É.......................
using System;
using System.Text;
using System.Data;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Web;
using System.Web.UI;
using System.Xml;
namespace Gogofly.CommonOperation
{
/// <summary>
/// Êý¾ÝÀàÐÍת»»
/// </summary>
public class DataTypeConvert
{
#region Êý¾ÝÀàÐÍת»»
public DataTypeConvert(){}
/// <summary>
/// ×Ö·û´®×ª»»ÎªÕûÊý
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public static int ConvertToInt(string value)
{ ///Êý¾ÝΪ¿Õ£¬·µ»Ø-1
if(string.IsNullOrEmpty(value))return -1;
int result = -1;
///Ö´ÐÐת»»²Ù×÷
Int32.TryParse(value,out result);
return result;
}
/// <summary>
/// ×Ö·û´®×ª»»ÎªÊ±¼ä
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public static DateTime ConvertToDateTime(string value)
{ ///¶¨Òå³õʼ»¯Öµ
DateTime result = DateTime.Parse("1900-01-01");
if(string.IsNullOrEmpty(value)) return result;
///Ö´ÐÐת»»²Ù×÷
DateTime.TryParse(value,out result);
return result;
}
/// <summary>
/// ×Ö·û´®×ª»»ÎªÊµÊý
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public static decimal ConvertToDecimal(string value)
{ ///¶¨Òå³õʼ»¯Öµ
decimal result = 0.0M;
if(string.IsNullOrEmpt
Ïà¹ØÎĵµ£º
Paul.Todd | 09 April, 2007 15:24
I have noticed a couple of people seem to be having problems with using the XML parser in Symbian and there are no examples outside of the devkit. The parser I will be talking about is the xml one, not the one SOAP engine as the SOAP one is Nokia specific.
The ke ......
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"
>
......
JDOM ÊÇÒ»¸ö¿ªÔ´µÄ´¿java API,ÓÃÓÚ¿ìËÙ¿ª·¢ XML Ó¦ÓóÌÐò,JDOM½«XMLÎĵµ±íʾΪÊ÷£¬°üÀ¨ÔªËØ¡¢ÊôÐÔ¡¢ËµÃ÷¡¢´¦ÀíÖ¸Áî¡¢Îı¾½Úµã¡¢CDATA¶Î£¬µÈµÈ¡£JDOM¿ÉÒÔËæÊ±·ÃÎÊÊ÷ÖеÄÈÎÒⲿ·Ö¡£Ê÷ÖÐËùÓв»Í¬½Úµã¾ùΪ¾ßÌåµÄÀà¡£ÔÚhttp://jdom.org¿ÉÒÔÏÂÔØJDOMµÄ×îа汾(ÎÒÕâÀïÊÇ1.0)¡£ÏÂÔØºó½âѹ£¬JDOMµÄjarÎļþ¾ÍÊÇbuildÄ ......
¡¡ ¿ÉÒÔ½«XMLÎļþµÄÊ÷(Ö»ÓÐÒ»¸ö¶¥²ã½Úµã).ÓÚÊÇÀíËùµ±È»µÄ¿ÉÒÔÓÃÊ÷×÷ΪXMLµÄÒ»ÖÖ´æ´¢½á¹¹.
ÎÒ½«ÔÚÕâÀïÓÃC++ʵÏÖ¶Ô¼òµ¥µÄXMLÎļþµÄ½âÎö.
1.Ñ¡Ôñ´æ´¢½á¹¹:
Ê÷ÐÍÊý¾Ý½á¹¹ÓжàÖÖ´æ´¢·½Ê½,ÎÒ½«ÓÃ"º¢×ÓÐֵܱíʾ·¨",¶¨ÒåÈçÏÂ:
typedef struct CSNode
{
int subNodes;
string data;
string name;
struct CSNode *fi ......
XmlDocument doc = new XmlDocument();
string strtxt = "";
doc.Load(Server.MapPath("XMLFile1.xml"));
&nbs ......