Added code to assure consistent case of node names of xml generated in AddNode method of PrivateProfile class

Added code to assure consistent case of attribute names of xml generated in AddParam method of PrivateProfile class
This commit is contained in:
Rich 2012-12-04 22:37:17 +00:00
parent cd3e0af534
commit de08f24053

View File

@ -42,7 +42,7 @@ namespace Config
{
XmlNode nd;
// Add a node
string tsName = sName.Replace(' ', '_');
string tsName = sName.Replace(' ', '_').Replace("applicability", "Applicability").Replace("unit", "Unit");
nd=xParent.OwnerDocument.CreateNode(System.Xml.XmlNodeType.Element,tsName,"");
xParent.AppendChild(nd);
return nd;
@ -136,7 +136,7 @@ namespace Config
if (!attr.Contains(attrname.ToLower())) attrname = 'z' + attrname;
string sValue=sParam.Substring(i+1);
string sName = attrname.Trim(' ');
sName = sName.Replace("id", "ID").Replace("name", "Name").Replace("number", "Number").Replace("text", "Text").Replace("other", "Other");
sName = sName.Replace("id", "ID").Replace("name", "Name").Replace("number", "Number").Replace("text", "Text").Replace("other", "Other").Replace("masterdir","MasterDir");
AddAttribute(xParent, sName, sValue);
}
private void AddParam_UC(XmlNode xParent, string sParam)