本文整理汇总了C#中System.Xml.XmlElement.GetInnerText方法的典型用法代码示例。如果您正苦于以下问题:C# XmlElement.GetInnerText方法的具体用法?C# XmlElement.GetInnerText怎么用?C# XmlElement.GetInnerText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Xml.XmlElement
的用法示例。
在下文中一共展示了XmlElement.GetInnerText方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HtmlElement
// コンストラクタ
/// <summary>
/// XmlNode を指定して、HtmlElement クラスのインスタンスを開始します。
/// </summary>
public HtmlElement(XmlElement e) : base(e){
myNote = e.GetInnerText(HatomaruHtmlRef.NoteElementName);
myNoteJa = e.GetInnerText(HatomaruHtmlRef.NoteJaElementName);
string omitStr = e.GetInnerText(HatomaruHtmlRef.OmitElementName);
if(omitStr != null && omitStr.Length == 2){
myOmitStartTag = omitStr[0] == 'o';
myOmitEndTag = omitStr[1] == 'o';
}
}
示例2: HtmlAttribute
// コンストラクタ
/// <summary>
/// XmlNode を指定して、HtmlElement クラスのインスタンスを開始します。
/// </summary>
public HtmlAttribute(XmlElement e) : base(e){
myNote = e.GetInnerText(HatomaruHtmlRef.NoteElementName);
myDefault = e.GetInnerText(HatomaruHtmlRef.DefaultElementName);
myFor = e.GetAttributeValue(HatomaruHtmlRef.ForAttributeName);
if(string.IsNullOrEmpty(myId)){
myId = myName;
if(!string.IsNullOrEmpty(myFor)) myId += IdSeparator + myFor;
}
}
示例3: GameAchievement
internal GameAchievement(long steamid64, int appid, XmlElement data)
{
SteamID64 = steamid64;
AppID = appid;
Data = data;
Name = data.GetInnerText("name");
Unlocked = data.Attributes["closed"] != null;
if (data.GetElementsByTagName("unlockTimestamp").Count > 0)
Timestamp = new DateTime(Convert.ToInt32(data.GetInnerText("unlockTimestamp")));
}
示例4: Load
// publicメソッド
// XmlElementからAmazonItemのプロパティをロードします。
public void Load(XmlElement itemElement){
if(itemElement.Name != ItemElementName){
throw new ArgumentException("AmazonItemをロードしようとしましたが、Item要素が渡されませんでした。要素名:" + itemElement.Name);
}
this.Asin = itemElement.GetInnerText(AsinElementName);
this.DetailPageUrl = itemElement.GetInnerText(DetailPageUrlElementName);
XmlElement attrElement = itemElement[ItemAttributesElementName];
if(attrElement != null){
this.Title = attrElement.GetInnerText(TitleElementName);
}
XmlNodeList imageElements = itemElement.GetElementsByTagName(ImageElementName);
if(imageElements.Count > 0) this.Image = new AmazonImage(imageElements[0] as XmlElement);
}
示例5: TF2Class
public TF2Class(XmlElement data)
: base(data)
{
MaxBuildingsDestroyed = int.Parse(data.GetInnerText("ibuildingsdestroyed"));
MaxCaptures = int.Parse(data.GetInnerText("ipointcaptures"));
MaxDamage = int.Parse(data.GetInnerText("idamagedealt"));
MaxDefenses = int.Parse(data.GetInnerText("ipointdefenses"));
MaxDominations = int.Parse(data.GetInnerText("idominations"));
MaxKillAssists = int.Parse(data.GetInnerText("ikillassists"));
MaxKills = int.Parse(data.GetInnerText("inumberofkills"));
MaxRevenges = int.Parse(data.GetInnerText("irevenge"));
MaxScore = int.Parse(data.GetInnerText("ipointsscored"));
MaxTimeAlive = int.Parse(data.GetInnerText("iplaytime"));
}
示例6: L4DFavourite
public L4DFavourite(XmlElement data)
{
Campaign = data.GetInnerText("campaign");
CampaignPercentage = int.Parse(data.GetInnerText("campaignpct"));
Character = data.GetInnerText("character");
CharacterPercentage = int.Parse(data.GetInnerText("characterpct"));
Level1Weapon = data.GetInnerText("weapon1");
Level1WeaponPercentage = int.Parse(data.GetInnerText("weapon1pct"));
Level2Weapon = data.GetInnerText("weapon2");
Level2WeaponPercentage = int.Parse(data.GetInnerText("weapon2pct"));
}
示例7: TF2Spy
public TF2Spy(XmlElement data)
: base(data)
{
MaxBackstabs = int.Parse(data.GetInnerText("ibackstabs"));
MaxHealthLeeched = int.Parse(data.GetInnerText("ihealthpointsleached"));
}
示例8: L4D2ScavengeStats
public L4D2ScavengeStats(XmlElement data)
{
AverageCansPerRound = float.Parse(data.GetInnerText("avgcansperround"));
PerfectRounds = int.Parse(data.GetInnerText("perfect16canrounds"));
RoundsLost = int.Parse(data.GetInnerText("roundslost"));
RoundsPlayed = int.Parse(data.GetInnerText("roundsplayed"));
RoundsWon = int.Parse(data.GetInnerText("roundswon"));
TotalCans = int.Parse(data.GetInnerText("totalcans"));
List<L4D2ScavengeMapStats> mapList = new List<L4D2ScavengeMapStats>();
foreach (XmlElement map in data.GetXmlElement("mapstats")) {
mapList.Add(new L4D2ScavengeMapStats(map));
}
MapStats = mapList.ToArray();
}
示例9: DoDSClass
public DoDSClass(XmlElement data)
{
Key = data.GetAttribute("key");
Name = data.GetInnerText("name");
Blocks = int.Parse(data.GetInnerText("blocks"));
BombsDefused = int.Parse(data.GetInnerText("bombsdefused"));
BombsPlanted = int.Parse(data.GetInnerText("bombsplanted"));
Captures = int.Parse(data.GetInnerText("captures"));
Deaths = int.Parse(data.GetInnerText("deaths"));
Dominations = int.Parse(data.GetInnerText("dominations"));
Kills = int.Parse(data.GetInnerText("kills"));
RoundsLost = int.Parse(data.GetInnerText("roundslost"));
RoundsWon = int.Parse(data.GetInnerText("roundswon"));
RoundsLost = int.Parse(data.GetInnerText("roundslost"));
Revenges = int.Parse(data.GetInnerText("revenges"));
PlayTime = int.Parse(data.GetInnerText("playtime"));
}
示例10: AlienSwarmFavorites
public AlienSwarmFavorites(XmlElement data)
{
Class = data.GetInnerText("class");
ClassImage = data.GetInnerText("classimg");
ClassPercentage = float.Parse(data.GetInnerText("classpct"));
Difficulty = data.GetInnerText("difficulty");
DifficultyPercentage = float.Parse(data.GetInnerText("difficultypct"));
Extra = data.GetInnerText("extra");
ExtraImage = data.GetInnerText("extraimg");
ExtraPercentage = float.Parse(data.GetInnerText("extrapct"));
Marine = data.GetInnerText("marine");
MarineImage = data.GetInnerText("marineimg");
MarinePercentage = float.Parse(data.GetInnerText("marinepct"));
Mission = data.GetInnerText("mission");
MissionImage = data.GetInnerText("missionimg");
MissionPercentage = float.Parse(data.GetInnerText("missionpct"));
PrimaryWeapon = data.GetInnerText("primary");
PrimaryWeaponImage = data.GetInnerText("primaryimg");
PrimaryWeaponPercentage = float.Parse(data.GetInnerText("primarypct"));
SecondaryWeapon = data.GetInnerText("secondary");
SecondaryWeaponImage = data.GetInnerText("secondaryimg");
SecondaryWeaponPercentage = float.Parse(data.GetInnerText("secondarypct"));
}
示例11: AlienSwarmWeapon
public AlienSwarmWeapon(XmlElement data)
: base(data)
{
Accuracy = float.Parse(data.GetInnerText("accuracy"));
Damage = int.Parse(data.GetInnerText("damage"));
FriendlyFire = int.Parse(data.GetInnerText("friendlyfire"));
Name = data.GetInnerText("name");
Shots = int.Parse(data.GetInnerText("shotsfired"));
}
示例12: CSSLastMatchStats
public CSSLastMatchStats(XmlElement data)
{
CostPerKill = float.Parse(data.GetInnerText("costkill"));
CTWins = int.Parse(data.GetInnerText("ct_wins"));
Damage = int.Parse(data.GetInnerText("dmg"));
Deaths = int.Parse(data.GetInnerText("deaths"));
Dominations = int.Parse(data.GetInnerText("dominations"));
FavoriteWeapon = int.Parse(data.GetInnerText("favwpnid"));
Kills = int.Parse(data.GetInnerText("kills"));
MaxPlayers = int.Parse(data.GetInnerText("max_players"));
Money = int.Parse(data.GetInnerText("money"));
Revenges = int.Parse(data.GetInnerText("revenges"));
Stars = int.Parse(data.GetInnerText("stars"));
TWins = int.Parse(data.GetInnerText("t_wins"));
Wins = int.Parse(data.GetInnerText("wins"));
if (Deaths == 0)
KDRatio = 0;
else
KDRatio = Kills / Deaths;
}
示例13: CSSWeapon
public CSSWeapon(string weaponname, XmlElement data)
{
Name = weaponname;
if ((Name != "grenade") && (Name != "knife"))
{
Favorite = data.GetInnerText("favorite").Equals(Name);
Kills = int.Parse(data.GetInnerText(Name + "_kills"));
Shots = int.Parse(data.GetInnerText(Name + "_shots"));
if (Shots != 0)
{
Accuracy = Hits / Shots;
KSRatio = Kills / Shots;
}
else
{
Accuracy = 0;
KSRatio = 0;
}
}
}
示例14: L4DTeamPlayStats
public L4DTeamPlayStats(XmlElement data)
{
Revived = int.Parse(data.GetInnerText("revived"));
MostRevivedDifficulty = data.GetInnerText("reviveddiff");
AverageRevived = float.Parse(data.GetInnerText("revivedavg"));
AverageWasRevived = float.Parse(data.GetInnerText("wasrevivedavg"));
Protected = int.Parse(data.GetInnerText("protected"));
MostProtectedDifficulty = data.GetInnerText("protecteddiff");
AverageProtected = float.Parse(data.GetInnerText("protectedavg"));
AverageWasProtected = float.Parse(data.GetInnerText("wasprotectedavg"));
FriendlyFireDamage = int.Parse(data.GetInnerText("ffdamage"));
MostFriendlyFireDamageDifficulty = data.GetInnerText("ffdamagediff");
AverageFriendlyFireDamage=float.Parse(data.GetInnerText("ffdamageavg"));
}
示例15: CSSMap
public CSSMap(string mapname, XmlElement data)
{
Name = mapname;
Favorite = data.GetInnerText("favorite").Equals(Name);
RoundsPlayed = int.Parse(data.GetInnerText(Name + "_rounds"));
RoundsWon = int.Parse(data.GetInnerText(Name + "_wins"));
RoundsLost = RoundsPlayed - RoundsWon;
RoundsWonPercentage = (RoundsPlayed > 0) ? ((float)RoundsWon / RoundsPlayed) : 0;
}