本文整理汇总了C#中System.Xml.XmlElement.CreateChildElement方法的典型用法代码示例。如果您正苦于以下问题:C# XmlElement.CreateChildElement方法的具体用法?C# XmlElement.CreateChildElement怎么用?C# XmlElement.CreateChildElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Xml.XmlElement
的用法示例。
在下文中一共展示了XmlElement.CreateChildElement方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddToParentElement
/// <summary>
/// 加入到父元素
/// </summary>
public virtual void AddToParentElement(XmlElement parent)
{
XmlElement parElem = parent.CreateChildElement("ObjectDataSource");
parElem.SetAttr("Name", this.Name);
parElem.SetAttr("Category", this.Category);
parElem.SetAttr("Type", this.Type.ToString());
RelationVariables.AddToParentElement(parElem);
}
示例2: AddToParentElement
/// <summary>
/// 加入到父元素
/// </summary>
public virtual void AddToParentElement(XmlElement parent)
{
XmlElement metaDataElem = parent.CreateChildElement("MetaData");
metaDataElem.SetElementText("Version", Version);
metaDataElem.SetElementText("CreateTime", CreateTime);
metaDataElem.SetElementText("Creator", Creator);
metaDataElem.SetElementText("Description", Description);
}
示例3: AddToParentElement
/// <summary>
/// 加入到父元素
/// </summary>
public virtual void AddToParentElement(XmlElement parent)
{
XmlElement parElem = parent.CreateChildElement("ConfigParameters");
XmlElement parItemElem = parElem.CreateChildElement("Items");
foreach (var item in Items)
{
item.AddToParentElement(parItemElem);
}
}
示例4: AddToParentElement
/// <summary>
/// 加入到父元素
/// </summary>
public virtual void AddToParentElement(XmlElement parent)
{
XmlElement varElem = parent.CreateChildElement("Variables");
XmlElement varItemElem = varElem.CreateChildElement("Items");
foreach (var item in Items)
{
item.AddToParentElement(varItemElem);
}
}
示例5: AddToParentElement
/// <summary>
/// 加入到父元素
/// </summary>
public virtual void AddToParentElement(XmlElement parent)
{
XmlElement parElem = parent.CreateChildElement("DataSources");
XmlElement parItemElem = parElem.CreateChildElement("ObjectDataSources");
foreach (var item in ObjectDataSources)
{
item.AddToParentElement(parItemElem);
}
}
示例6: AddToParentElement
/// <summary>
/// 加入到父元素
/// </summary>
public virtual void AddToParentElement(XmlElement parent)
{
XmlElement parElem = parent.CreateChildElement("Variable");
parElem.SetAttr("Id", this.Id);
parElem.SetAttr("Name", this.Name);
parElem.SetAttr("Value", this.Value);
parElem.SetAttr("DisplayInfo", this.DisplayInfo);
parElem.SetAttr("Description", this.Description);
parElem.SetAttr("Type", this.Type);
}
示例7: AddToParentElement
/// <summary>
/// 加入到父元素
/// </summary>
public virtual void AddToParentElement(XmlElement parent)
{
XmlElement parElem = parent.CreateChildElement("RelationVariables");
parElem.SetAttr("BindType", this.BindType);
XmlElement parItemElem = parElem.CreateChildElement("Items");
foreach (var item in Items)
{
parItemElem.SetElementText("Variable", item);
}
}
示例8: ToXml
public void ToXml(XmlElement xmlElement)
{
xmlElement.SetString("PatherVersion", PatherVersion.ToString());
xmlElement.SetBoolean("IsFullScreen", IsFullScreen);
xmlElement.SetBoolean("IsFullHd", IsFullHd);
xmlElement.SetBoolean("IsNihonVoice", IsNihonVoice);
if (SwitchButtons != null)
xmlElement.SetBoolean("SwitchButtons", SwitchButtons.Value);
xmlElement.SetInt32("AntiAliasing", AntiAliasing);
xmlElement.SetInt32("ShadowResolution", ShadowResolution);
xmlElement.SetBoolean("PlayMusic", PlayMusic);
xmlElement.SetBoolean("ExitAfterRunGame", ExitAfterRunGame);
XmlElement urls = xmlElement.CreateChildElement("PatherUrls");
foreach (string url in PatherUrls)
urls.CreateChildElement("Url").SetString("Value", url);
urls = xmlElement.CreateChildElement("TranslationUrls");
foreach (string url in TranslationUrls)
urls.CreateChildElement("Url").SetString("Value", url);
}
示例9: AddToParentElement
/// <summary>
/// 加入到父元素
/// </summary>
public virtual void AddToParentElement(XmlElement parent)
{
XmlElement itemElem = parent.CreateChildElement("BindableMember");
itemElem.SetAttr("Name", this.Name);
}
示例10: AddToParentElement
/// <summary>
/// 加入到父元素
/// </summary>
public virtual void AddToParentElement(XmlElement parent)
{
XmlElement itemElem = parent.CreateChildElement(DEFAULT_PREFIX);
itemElem.SetAttr("Id", this.Id);
itemElem.SetAttr("DataSource", this.DataSource);
itemElem.SetAttr("BindMember", this.BindMember);
itemElem.SetAttr("RelationVariables", this.RelationVariables);
itemElem.SetAttr("Type", this.Type.ToString());
itemElem.SetAttr("DisplayInfo", this.DisplayInfo);
itemElem.SetAttr("ValueServiceUrl", this.ValueServiceUrl);
itemElem.CreateCData("Scripts", this.Scripts);
}
示例11: AddToParentElement
/// <summary>
/// 加入到父元素
/// </summary>
public virtual void AddToParentElement(XmlElement parent)
{
XmlElement miscElem = parent.CreateChildElement("Misc");
miscElem.SetElementText("RefreshInterval", RefreshInterval.ToString());
}