コード例 #1
0
        public static string GetStringValueFromChildPropertyNode(XmlNode parent, string PropertyName)
        {
            XmlNode node = XmlSerialization.GetPropertyXmlNode(parent, PropertyName);

            if (node != null)
            {
                return(node.InnerText);
            }
            return("");
        }
コード例 #2
0
        public static XmlNode WriteStringValueToChildPropertyNode(XmlNode parent, string PropertyName, string value)
        {
            XmlNode node = XmlSerialization.GetPropertyXmlNode(parent, PropertyName);

            if (node == null)
            {
                node = parent.OwnerDocument.CreateElement(XML_PROPERTY);
                parent.AppendChild(node);
                XmlSerialization.SetAttribute(node, XMLATT_NAME, PropertyName);
            }
            node.InnerText = value;
            return(node);
        }