ApiCore.XmlUtils.String C# (CSharp) Метод

String() публичный статический Метод

Gets the string value from node
public static String ( string nodeName ) : string
nodeName string node
Результат string
        public static string String(string nodeName)
        {
            if (XmlUtils.node.SelectSingleNode(nodeName) != null)
            {
                return XmlUtils.node.SelectSingleNode(nodeName).InnerText
                                                                .Replace("<br>", "\r\n");

            }
            return "";
        }

Usage Example

Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="node"></param>
        /// <returns></returns>
        public static EntryComment GetEntryComment(XmlNode node)
        {
            XmlUtils.UseNode(node);
            EntryComment e = new EntryComment();

            e.Id             = XmlUtils.Int("cid");
            e.Date           = CommonUtils.FromUnixTime(XmlUtils.Int("date"));
            e.Text           = XmlUtils.String("text");
            e.UserId         = XmlUtils.Int("uid");
            e.ReplyToComment = XmlUtils.Int("reply_to_сid");
            e.ReplyToUser    = XmlUtils.Int("reply_to_uid");
            return(e);
        }
All Usage Examples Of ApiCore.XmlUtils::String