• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# XmlElement类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中XmlElement的典型用法代码示例。如果您正苦于以下问题:C# XmlElement类的具体用法?C# XmlElement怎么用?C# XmlElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



XmlElement类属于命名空间,在下文中一共展示了XmlElement类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Tbl_ChargeRecord

	public Tbl_ChargeRecord(XmlElement _element)
	{
		try
		{
			XmlNode node = (XmlElement)_element;

			foreach (XmlNode attribute in node.Attributes)
			{
				if (attribute.Name == "ProductID")
					itemID = attribute.Value;
				else if (attribute.Name == "Type")
				{
					if (attribute.Value == "SPHERE")
						chargeType = eCHARGETYPE.eCHARGETYPE_MIRACLE;
					else if (attribute.Value == "DAILY")
						chargeType = eCHARGETYPE.eCHARGETYPE_DAILY;
					else
						chargeType = eCHARGETYPE.eCHARGETYPE_NOTHING;
				}
				else if (attribute.Name == "DescriptionID")
					descriptionID = int.Parse(attribute.Value);
				else if (attribute.Name == "Icon")
					iconPath = attribute.Value;
				else if (attribute.Name == "UseTime")
					useTime = attribute.Value == "NONE" ? 0 : int.Parse(attribute.Value);
			}
		}
		catch (System.Exception e)
		{
			Debug.LogError(e);
		}
	}
开发者ID:ftcaicai,项目名称:ArkClient,代码行数:32,代码来源:Tbl_Charge.cs


示例2: Tbl_PetLevel_Record

	public Tbl_PetLevel_Record(XmlElement _element)
	{
		try{
			XmlNode node = (XmlElement)_element;
			SetAttribute(ref m_StarGrade, node, "StarGrade");

			XmlNodeList nodes = node.ChildNodes;
			foreach(XmlNode node1 in nodes)
			{
				int lv = 1; int exp = 0; int passive = 0; int active = 0; int special = 0;

				SetAttribute(ref lv, node1, "Level");
				SetAttribute(ref exp, node1, "Exp");
				SetAttribute(ref passive, node1, "PassiveSkillLv");
				SetAttribute(ref active, node1, "ActiveSkillLv");
				SetAttribute(ref special, node1, "SpecialSkillLv");

				m_listData.Add(lv, new PetLevelData(lv, exp, passive, active, special));
			}
		}
		catch(System.Exception e)
		{
			Debug.LogError(e);
		}
	}
开发者ID:ftcaicai,项目名称:ArkClient,代码行数:25,代码来源:Tbl_PetLevel.cs


示例3: checkAppearanceFieldList

 /// <summary>
 /// cycle for normal items
 /// </summary>
 /// <param name="g"></param>
 /// <param name="importingElemList"></param>
 private void checkAppearanceFieldList(XmlElement g, List<ImportingElement> importingElemList)
 {
     XmlNodeList groupElements = g.ChildNodes;
     Debug.WriteLine("Found " + groupElements.Count + " elements in this group");
     for (int j = 0; j < groupElements.Count; j++)
     {
         if (groupElements.Item(j).Name == "input")
         {
             Debug.WriteLine("Found an input node");
             XmlElement node = (XmlElement)groupElements.Item(j);
             ImportingElement importingElem = checkAttributesRefInput(node);
             importingElemList.Add(importingElem);
         }
         if (groupElements.Item(j).Name == "select")
         {
             Debug.WriteLine("Found a select node");
             XmlElement node = (XmlElement)groupElements.Item(j);
             ImportingElement importingElem = checkAttributesRefSelect(node);
             importingElemList.Add(importingElem);
         }
         if (groupElements.Item(j).Name == "select1")
         {
             Debug.WriteLine("Found a select1 node");
             XmlElement node = (XmlElement)groupElements.Item(j);
             ImportingElement importingElem = checkAttributesRefSelect1(node);
             if (importingElem.typeAttribute != "currency")
                 importingElemList.Add(importingElem);
         }
     }
 }
开发者ID:WFPVAM,项目名称:GRASPReporting,代码行数:35,代码来源:ImportFormPrototype.aspx.cs


示例4: Rot

 //! initializes from passed-in xml element, in format <someelement x="..." y="..." z="..." s="..."/>
 public Rot( XmlElement xmlelement )
 {
     x = Convert.ToDouble( xmlelement.GetAttribute( "x" ) );
         y = Convert.ToDouble( xmlelement.GetAttribute( "y" ) );
         z = Convert.ToDouble( xmlelement.GetAttribute( "z" ) );
         s = Convert.ToDouble( xmlelement.GetAttribute( "s" ) );
 }
开发者ID:hughperkins,项目名称:SpringMapDesigner,代码行数:8,代码来源:Rot.cs


示例5: ParseElement

    public override void ParseElement(XmlElement element)
    {
        string tmpArgVal = "";

        tmpArgVal = element.GetAttribute("type");
        if (!string.IsNullOrEmpty(tmpArgVal))
        {
            if (tmpArgVal.Equals("none"))
                transition.setType(Transition.TYPE_NONE);
            else if (tmpArgVal.Equals("fadein"))
                transition.setType(Transition.TYPE_FADEIN);
            else if (tmpArgVal.Equals("vertical"))
                transition.setType(Transition.TYPE_VERTICAL);
            else if (tmpArgVal.Equals("horizontal"))
                transition.setType(Transition.TYPE_HORIZONTAL);
        }

        tmpArgVal = element.GetAttribute("time");
        if (!string.IsNullOrEmpty(tmpArgVal))
        {
            transition.setTime(long.Parse(tmpArgVal));
        }

        animation.getTransitions().Add(transition);
    }
开发者ID:Synpheros,项目名称:eAdventure4Unity,代码行数:25,代码来源:TransitionSubParser_.cs


示例6: Tbl_Promotion_Record

	public Tbl_Promotion_Record( XmlElement _element)
	{
		try
		{
			XmlNode node = (XmlElement)_element;

			SetValue( ref m_Index, node, "Index");
			SetValue( ref m_Priority, node, "Priority");
			SetValue<Def_Promotion.eCondition>( ref m_Condition, node, "Condition");
			SetValue<eCLASS>( ref m_Class, node, "Class");

			SetValue( ref m_Level_Min, node, "Level_Min");
			SetValue( ref m_Level_Max, node, "Level_Max");
			SetValue( ref m_Item_Index, node, "Item_Index");
			SetValue( ref m_String_Index, node, "String_Index");

			SetValue<eCashStoreMenuMode>( ref m_Miracle_Page, node, "Miracle_Page");

			SetValue( ref m_PromotionTime, node, "PromotionTime");
			SetValue( ref m_Probability, node, "Probability");
			SetValue( ref m_SubCategory, node, "Sub_Category");
			
		}
		catch( System.Exception e)
		{
			Debug.LogError( e);
		}
	}
开发者ID:ftcaicai,项目名称:ArkClient,代码行数:28,代码来源:Tbl_Promotion.cs


示例7: Test

        public void Test()
        {

            XmlElement xmlElement = new XmlElement("TestXml");
            XmlElement xmlElement1 = new XmlElement("ChlidElement1");
            xmlElement1.AddAttribute(new XmlAttribute("test", "12"));
            XmlElement addElement = xmlElement.AddElement(xmlElement1);
            string innerXml = xmlElement.InnerXml;
            string outterXml = xmlElement.OutterXml;
            XmlElement xmlElements = xmlElement.ChlidElements["ChlidElement1"][0];
            XmlElement element = xmlElement.Find(x => Equals(x.ElementName, "ChlidElement1"));
            // element = xmlElement.Find(@"\XML\@aa");
            XmlAttribute xmlAttributes = xmlElement1.Attributes["test"];
            XmlAttribute xmlAttribute = new XmlAttribute("name", "lsong");
            xmlElement.AddAttribute(xmlAttribute);

            XmlDocument xmlDocument = new XmlDocument(xmlElement);
            xmlDocument.SetRootElement(xmlElement);
            xmlDocument.SetVersion(new Version(1, 0, 0, 0));
            xmlDocument.Encoding = System.Text.Encoding.UTF8;
            xmlDocument.Save("c:\\temp.xml");

            xmlDocument.Load("c:\\temp.xml");
            //xmlDocument.LoadXml("<xml />");
            XmlElement rootElement = xmlDocument.RootElement;
        }
开发者ID:marinehero,项目名称:ThinkAway.net,代码行数:26,代码来源:XmlTest.cs


示例8: GenerateXml

	public static void GenerateXml()
	{
		Debug.Log("Processing..");
		enXml = new XmlDocument();
		ruXml = new XmlDocument();

		XmlUtil.xmlId = 0;

		string enXmlPath = String.Format(@"{0}\{1}", Application.dataPath, "data_en.xml");
		string ruXmlPath = String.Format(@"{0}\{1}", Application.dataPath, "data_ru.xml");

		if(File.Exists(enXmlPath))
		{
			enXml.Load(enXmlPath);
			ruXml.Load(ruXmlPath);

			XmlUtil.ruRootNode = (XmlElement)ruXml.FirstChild;
			XmlUtil.enRootNode = (XmlElement)enXml.FirstChild;
		}
		else
		{
			XmlUtil.enRootNode = (XmlElement)enXml.AppendChild(enXml.CreateElement("document"));
			XmlUtil.ruRootNode = (XmlElement)ruXml.AppendChild(ruXml.CreateElement("document"));
		}
		string startSearchPath = Application.dataPath;
		XmlUtil.GetAssets(startSearchPath); ///--- путь к ассетам
		XmlUtil.enXml.Save("data_en.xml");
		XmlUtil.ruXml.Save("data_ru.xml");
	}
开发者ID:vlad123kuznetsov,项目名称:Locator,代码行数:29,代码来源:XmlUtil.cs


示例9: readStringFromAttribute

 private string readStringFromAttribute(XmlElement element, String attribute)
 {
     if(element.HasAttribute(attribute)) {
         return element.Attributes[attribute].Value;
     }
     return null;
 }
开发者ID:andreino7,项目名称:rehabilitation-avatar,代码行数:7,代码来源:MenuSettings.cs


示例10: Tbl_Pet_Record

	public Tbl_Pet_Record(XmlElement _element)
	{
		try{
			XmlNode node = (XmlElement)_element;
			
			SetValue(ref m_Index, node, "PetID");
			SetValue(ref m_Name, node, "Name");
			SetValue(ref m_Desc, node, "Desc");
			SetValue(ref m_StarGrade, node, "StarGrade");

			SetValue(ref m_PersonGroupID, node, "PersonGroupID");
			SetValue(ref m_PassiveGroupID, node, "PassiveGroupID");
			SetValue(ref m_ActiveGroupID, node, "ActiveGroupID");
			SetValue(ref m_SpecialGroupID, node, "SpecialGroupID");
			SetValue(ref m_UpgradeID, node, "UpgradeID");
			SetValue(ref m_Class, node, "Class");

			SetValue(ref m_Icon, node, "Icon");
			SetValue(ref m_Model, node, "Model");
		}
		catch(System.Exception e)
		{
			Debug.LogError(e);
		}
	}
开发者ID:ftcaicai,项目名称:ArkClient,代码行数:25,代码来源:Tbl_PetData.cs


示例11: Tbl_Production_Record

	public Tbl_Production_Record(XmlElement _element)
	{
		try
		{
			XmlNode node = (XmlElement)_element;
			
			SetValue(ref m_iIndex, node, "Index");	
			SetValue<eITEM_PRODUCT_TECHNIQUE_TYPE>(ref m_type, node, "Production_Technic");
			
			SetValue(ref m_iLevel, node, "Production_Level");	
			SetValue(ref m_iItemID, node, "Production_Item_ID1");	
			SetValue(ref m_iItemCount, node, "Production_Item_Count1");	
			SetValue(ref itemTime, node, "Production_Item_Time");	
			itemTime *= 0.001f;
			SetValue(ref iExpertism , node, "Production_Item_Expertism");	
			SetValue(ref iExp , node, "Production_Item_EXP");	
			SetValue(ref iGold , node, "Production_Item_Gold");	
			SetValue(ref iBaseID , node, "Production_Item_Base");	
			SetValue(ref iBaseCount , node, "Production_Item_BaseCount");	
			SetValue(ref iSubID_1 , node, "Production_Item_Sub");	
			SetValue(ref iSubCount_1 , node, "Production_Item_SubCount");	
			SetValue(ref iSubID_2 , node, "Production_Item_Sub2");	
			SetValue(ref iSubCount_2 , node, "Production_Item_Sub2Count");	
			SetValue(ref iOpID , node, "Production_Item_Op");	
			SetValue(ref iOpCount , node, "Production_Item_OpCount");	
			SetValue(ref miracle, node, "Production_Item_Miracle");
			
		}
		catch(System.Exception e)
		{
			Debug.LogError(e);
		}
	}
开发者ID:ftcaicai,项目名称:ArkClient,代码行数:33,代码来源:Tbl_ProductionTable.cs


示例12: MonsterLineData

	public MonsterLineData( XmlElement _element)
	{
		try
		{
			XmlNode node = (XmlElement)_element;
			
			SetValue( ref groupIndex, node, "Index");
			SetValue( ref eType, node, "BallonCondition");
			SetValue( ref conditionValue, node, "BallonValue");
			SetValue( ref probability, node, "BallonProb");
			SetValue( ref lineIndex1, node, "BallonString1");
			SetValue( ref lineIndex2, node, "BallonString2");
			SetValue( ref lineIndex3, node, "BallonString3");
			
			if( int.MaxValue == lineIndex2)
				lineIndex2 = lineIndex1;
			
			if( int.MaxValue == lineIndex3)
				lineIndex3 = lineIndex1;
		}
		catch( System.Exception e)
		{
			Debug.LogError(e);
		}
	}
开发者ID:ftcaicai,项目名称:ArkClient,代码行数:25,代码来源:AsMonsterLineManager.cs


示例13: parse

            /// <summary>
            /// 从 body 字符串中解析,成功返回 true,否则 false
            /// </summary>
            /// <param name="str">body字符串</param>
            /// <param name="command">出参,对应 command 属性</param>
            /// <param name="cmd_node">出参,对应整个 cmd 节点</param>
            /// <param name="mcu_jid">出参,mcu jid</param>
            /// <param name="mcu_cid">出参,mcu cid</param>
            /// <returns></returns>
            public static bool parse(string str, out string command, out XmlElement cmd_node, out string mcu_jid, out int mcu_cid)
            {
                command = null;
                cmd_node = null;
                mcu_cid = 0;
                mcu_jid = null;

                try
                {
                    XmlDocument doc = new XmlDocument();
                    doc.LoadXml(str);

                    XmlElement node_zonekey = doc.DocumentElement;
                    if (node_zonekey.Name == "zonekey")
                    {
                        XmlNode node_app = node_zonekey.Attributes.GetNamedItem("app");
                        if (node_app != null && node_app.NodeType == XmlNodeType.Attribute && ((XmlAttribute)node_app).Value == "record_livingcast_service")
                        {
                            // 找到 cmd 节点,和 mcu 节点
                            XmlNodeList cmds = doc.SelectNodes("/zonekey/cmd");
                            XmlNodeList mcus = doc.SelectNodes("/zonekey/mcu");

                            if (cmds.Count >= 1 && mcus.Count >= 1)
                            {
                                cmd_node = (XmlElement)cmds[0];
                                XmlElement mcu_node = (XmlElement)mcus[0];

                                XmlNode attr_command = cmd_node.Attributes.GetNamedItem("command");
                                if (attr_command != null)
                                {
                                    command = attr_command.Value;

                                    int state = 0;
                                    foreach (XmlNode cn in mcu_node.ChildNodes)
                                    {
                                        if (cn.Name == "jid")
                                        {
                                            mcu_jid = cn.InnerText;
                                            state |= 1;
                                        }
                                        else if (cn.Name == "cid")
                                        {
                                            mcu_cid = int.Parse(cn.InnerText);
                                            state |= 2;
                                        }
                                    }

                                    return state == 3;  // 拥有 mcu_jid, mcu_cid
                                }
                            }
                        }
                    }

                    return false;
                }
                catch
                {
                    return false;
                }
            }
开发者ID:FihlaTV,项目名称:conference,代码行数:69,代码来源:Utility.Parser.cs


示例14: Tbl_Lottery_Record

	public Tbl_Lottery_Record(XmlElement _element)
	{
		
		System.Text.StringBuilder sbTemp = new System.Text.StringBuilder();
		
		try
		{
			XmlNode node = (XmlElement)_element;
		
			SetValue( ref Index, node, "Index" );
			SetValue( ref m_NeedEffect, node, "Eff_type" );			
			for( int i=1; i<=10; ++i )
			{
				int _iIndex = 0;
				sbTemp.Length = 0;
				sbTemp.Append( "Rand_ID" );
				sbTemp.Append( i );
				SetValue( ref _iIndex, node, sbTemp.ToString() );
				
				if( 0 != _iIndex && int.MaxValue != _iIndex )
				{
					idlist.Add( _iIndex ); 
				}
				else 
					break;
			}		
					
		}
		catch(System.Exception e)
		{
			Debug.LogError("[Tbl_Lottery_Record] 'constructor': |" + e.ToString() + "| error while parsing");
		}
	}
开发者ID:ftcaicai,项目名称:ArkClient,代码行数:33,代码来源:Tbl_LotteryTable.cs


示例15: Tbl_UserLevel_Record

	public Tbl_UserLevel_Record(XmlElement _element)// : base(_element)
	{
		try{
			XmlNode node = (XmlElement)_element;
			
			SetValue(ref m_Index, node, "Index");
			SetValue<eCLASS>(ref m_Class, node, "Class");
			SetValue(ref m_Level, node, "Level");
			SetValue(ref m_TotalEXP, node, "TotalEXP");
			SetValue(ref m_HPMax, node, "HPMax");
			SetValue(ref m_MPMax, node, "MPMax");
			SetValue(ref m_PhysicalAttack_Min, node, "PhysicalAttack_Min");
			SetValue(ref m_PhysicalAttack_Max, node, "PhysicalAttack_Max");
			SetValue(ref m_PhysicalDefense, node, "PhysicalDefense");
			SetValue(ref m_MagicalAttack_Min, node, "MagicalAttack_Min");
			SetValue(ref m_MagicalAttack_Max, node, "MagicalAttack_Max");
			SetValue(ref m_MagicalResist, node, "MagicalResist");
			SetValue(ref m_Resurrection_Cost, node, "Resurrection_Cost");
			
			SetValue(ref m_Lv_Bonus, node, "Lv_Bonus");
			SetValue(ref m_Lv_BonusCount, node, "Lv_BonusCount");
		}
		catch(System.Exception e)
		{
			Debug.LogError(e);
		}
	}
开发者ID:ftcaicai,项目名称:ArkClient,代码行数:27,代码来源:Tbl_UserLevel.cs


示例16: Tbl_InsQuestGroup_Record

	public Tbl_InsQuestGroup_Record(XmlElement _element)
	{
		try{
			XmlNode node = (XmlElement)_element;
			
			m_Ins_QuestGroup_ID = int.Parse(node["Ins_QuestGroup_ID"].InnerText);
			m_Ins_Quest_ID = int.Parse(node["Ins_Quest_ID"].InnerText);
			m_Ins_Group_Rate = int.Parse(node["Ins_Group_Rate"].InnerText);
			m_Monster_Kind_ID1 = int.Parse(node["Monster_Kind_ID1"].InnerText);
			m_Monster1_Kill_Count = int.Parse(node["Monster1_Kill_Count"].InnerText);
			m_Monster_Kind_ID2 = int.Parse(node["Monster_Kind_ID2"].InnerText);
			m_Monster2_Kill_Count = int.Parse(node["Monster2_Kill_Count"].InnerText);
			m_Monster_Kind_ID3 = int.Parse(node["Monster_Kind_ID3"].InnerText);
			m_Monster3_Kill_Count = int.Parse(node["Monster3_Kill_Count"].InnerText);
			m_Exp_Reward = int.Parse(node["Exp_Reward"].InnerText);
			m_Gold_Reward = int.Parse(node["Gold_Reward"].InnerText);
			m_Knight_Reward = int.Parse(node["Knight_Reward"].InnerText);
			m_Knight_Reward_Count = int.Parse(node["Knight_Reward_Count"].InnerText);
			m_Magician_Reward = int.Parse(node["Magician_Reward"].InnerText);
			m_Magician_Reward_Count = int.Parse(node["Magician_Reward_Count"].InnerText);
			m_Cleric_Reward = int.Parse(node["Cleric_Reward"].InnerText);
			m_Cleric_Reward_Count = int.Parse(node["Cleric_Reward_Count"].InnerText);
			m_Hunter_Reward = int.Parse(node["Hunter_Reward"].InnerText);
			m_Hunter_Reward_Count = int.Parse(node["Hunter_Reward_Count"].InnerText);
		}
		catch(System.Exception e)
		{
			Debug.LogError("[Tbl_InsQuestGroup_Record] 'constructor': |" + e + "| error while parsing");
		}
	}
开发者ID:ftcaicai,项目名称:ArkClient,代码行数:30,代码来源:Tbl_InsQuestGroupTable.cs


示例17: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     string xmlPath = Graphite.Tools.GetXmlPath("");
     string xmlFile = "";
     if (xmlPath.IndexOf("/demos") == 0)
     {
         xmlFile = "demos.xml";
     }
     else
     {
         xmlFile = "pages.xml";
     }
     //litBreadcrumb.Text = Graphite.Tools.GetXmlPath("");
     xmlDocument = new System.Xml.XmlDocument();
     xmlDocument.Load(HttpContext.Current.Server.MapPath(@"~\App_Data\Graphite\Internal\Sitemaps\" + xmlFile));
     xmlPath = xmlPath.Replace("default.aspx", "");
     xmlPath = xmlPath.Substring(0, xmlPath.Length - 1);
     //Response.Write(xmlPath);
     xmlElement = xmlDocument.SelectSingleNode(xmlPath) as XmlElement;
     StringBuilder sbBreadCrumb = new StringBuilder();
     XmlNode xmlNode = xmlElement as XmlNode;
     int nodeLevel = 0;
     while (xmlNode.Name != "#document")
     {
         sbBreadCrumb.AppendLine(getLink(xmlNode, nodeLevel));
         xmlNode = xmlNode.ParentNode as XmlNode;
         nodeLevel++;
     }
     sbBreadCrumb.AppendLine(" ‹ <a href='/'>Start page</a>");
     litBreadcrumb.Text = sbBreadCrumb.ToString();
 }
开发者ID:WouterBos,项目名称:graphite,代码行数:31,代码来源:Breadcrumb.ascx.cs


示例18: CssStylesheet

 // Constructor
 public CssStylesheet(XmlElement htmlElement)
 {
     if (htmlElement != null)
     {
         this.DiscoverStyleDefinitions(htmlElement);
     }
 }
开发者ID:swganhtools,项目名称:swganhclientlauncher,代码行数:8,代码来源:HtmlCssParser.cs


示例19: Conversation

    public Conversation(XmlElement element, LineCatalogue catalogue)
    {
        persistentConversation = new PersistentConversation();
        persistentConversation.name = element.GetAttribute("name");

        if(SaveLoad.SaveExits()) {
            PersistentConversation tmp = (PersistentConversation)SaveLoad.ReadSaveFile(PersistentConversation.GetSaveFileName(persistentConversation.name));
            if(tmp != null) {
                persistentConversation = tmp;
            }
            else {
                SaveLoad.ResetSave();
            }

        }

        //Debug.Log("Conversation.Conversation() name=" + persistentConversation.name );
        participants = new ArrayList();
        XmlNodeList participantNodeList = element.GetElementsByTagName("participant");
        foreach (XmlElement participantElement in participantNodeList){
            string participantName = participantElement.GetAttribute("name");
            participants.Add(CharacterManager.GetCharacter(participantName));
        }

        XmlElement rootLineElement = (XmlElement)element.GetElementsByTagName("root_line").Item(0);
        rootLine = new RootLine(rootLineElement, catalogue, this);
        rootLine.ConnectLinks(catalogue);
        currentController = null;
    }
开发者ID:kiichi7,项目名称:Lies_and_Seductions,代码行数:29,代码来源:Conversation.cs


示例20: Tbl_Npc_Record

	public Tbl_Npc_Record(XmlElement _element)// : base(_element)
	{
		try{
			XmlNode node = (XmlElement)_element;
			
			SetValue(ref m_Id, node, "ID");			
			SetValue(ref m_iNpcNameId, node, "NpcName");
			SetValue(ref m_iNpcGNameId, node, "NpcGName");
			SetValue<eNPCType>(ref m_NpcType, node, "NpcType");
			SetValue(ref m_SpawnCheck, node, "SpawnCheck");
			SetValue(ref m_SpawnTimeMin, node, "SpawnTime_Min");
			SetValue(ref m_SpawnTimeMax, node, "SpawnTime_Max");
			SetValue( ref m_LineIndex, node, "ChatBalloonIndex");
			SetValue(ref m_ModelingPath, node, "ModelingPath");
			SetValue(ref m_NpcIcon, node, "NpcIcon");
			SetValue(ref m_fScale, node, "Scale");
			SetValue(ref m_fPointScale, node, "PointScale");
			SetValue(ref m_fCollisionRadius, node, "CollisionRadius");			
			SetValue(ref m_UseCheck, node, "UseCheck");
			SetValue(ref m_fOrgSize, node, "OrgSize");
			SetValue(ref m_RegenString, node, "RegenString");
			SetValue(ref m_strNickColor, node, "NickColor");
			SetValue(ref m_warpIndex, node, "WarpIndex");			
			
			
			m_fCollisionRadius = m_fCollisionRadius/ 100.0f;
		}
		catch(System.Exception e)
		{
			Debug.LogError(e);
		}
	}	
开发者ID:ftcaicai,项目名称:ArkClient,代码行数:32,代码来源:Tbl_Npc.cs



注:本文中的XmlElement类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# XmlElementHelper类代码示例发布时间:2022-05-24
下一篇:
C# XmlDocument类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap