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:
parent
cd3e0af534
commit
de08f24053
@ -42,7 +42,7 @@ namespace Config
|
|||||||
{
|
{
|
||||||
XmlNode nd;
|
XmlNode nd;
|
||||||
// Add a node
|
// 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,"");
|
nd=xParent.OwnerDocument.CreateNode(System.Xml.XmlNodeType.Element,tsName,"");
|
||||||
xParent.AppendChild(nd);
|
xParent.AppendChild(nd);
|
||||||
return nd;
|
return nd;
|
||||||
@ -136,7 +136,7 @@ namespace Config
|
|||||||
if (!attr.Contains(attrname.ToLower())) attrname = 'z' + attrname;
|
if (!attr.Contains(attrname.ToLower())) attrname = 'z' + attrname;
|
||||||
string sValue=sParam.Substring(i+1);
|
string sValue=sParam.Substring(i+1);
|
||||||
string sName = attrname.Trim(' ');
|
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);
|
AddAttribute(xParent, sName, sValue);
|
||||||
}
|
}
|
||||||
private void AddParam_UC(XmlNode xParent, string sParam)
|
private void AddParam_UC(XmlNode xParent, string sParam)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user