예제 #1
0
        private Encoding GetEncoding(XmlNode identificationNode)
        {
            var encodingNode = identificationNode.SelectSingleNode("encoding");

            var encoding = new Encoding();

            if (encodingNode != null)
            {
                encoding.Software = GetInnerTextOfChildTag(encodingNode, "software");

                encoding.Description = GetInnerTextOfChildTag(encodingNode, "encoding-description");

                var encodingDate = encodingNode.SelectSingleNode("encoding-date");
                if (encodingDate != null)
                {
                    encoding.EncodingDate = Convert.ToDateTime(encodingDate.InnerText);
                }
            }

            return(encoding);
        }
예제 #2
0
		private static Encoding GetEncoding(XmlNode identificationNode)
		{
			var encodingNode = identificationNode.SelectSingleNode("encoding");

			var encoding = new Encoding();

			if (encodingNode != null)
			{
				encoding.Software = GetInnerTextOfChildTag(encodingNode, "software");

				encoding.Description = GetInnerTextOfChildTag(encodingNode, "encoding-description");

				var encodingDate = encodingNode.SelectSingleNode("encoding-date");
				if (encodingDate != null)
					encoding.EncodingDate = Convert.ToDateTime(encodingDate.InnerText);
			}

			return encoding;
		}