Using System;
Using System. Xml;
Namespace WLERP. Common. Util
{
/// <Summary>
/// Xml operation tool class
/// </Summary>
Public sealed class XmlUtil
{
Private XmlUtil (){}
/// <Summary>
/// Create a node
/// </Summary>
/// <Param name = "node"> </param>
/// <Param name = "newElementName"> </param>
/// <Returns> </returns>
Public static XmlNode AppendElement (XmlNode node, string newElementName)
{
Return AppendElement (node, newElementName, null );
}
/// <Summary>
/// Create a node
/// </Summary>
/// <Param name = "node"> </param>
/// <Param name = "newElementName"> </param>
/// <Param name = "innerValue"> </param>
/// <Returns> </returns>
Public static XmlNode AppendElement (XmlNode node, string newElementName, string innerValue)
{
XmlNode oNode;
If (node is XmlDocument)
{
ONode = node. AppendChild (XmlDocument) node). CreateElement (newElementName ));
}
Else
{
ONode = node. AppendChild (node. OwnerDocument. CreateElement (newElementName ));
}
&