Encog.Parse.Tags.Read.ReadXML.ReadTextToTag C# (CSharp) Method

ReadTextToTag() public method

Read all text between the current position and the next tag.
public ReadTextToTag ( ) : String
return String
        public String ReadTextToTag()
        {
            var result = new StringBuilder();
            bool done = false;

            while (!done)
            {
                int ch = Read();
                if ((ch == -1) || (ch == 0))
                {
                    done = true;
                }
                else
                {
                    result.Append((char) ch);
                }
            }
            return result.ToString();
        }
    }

Usage Example

        /// <summary>
        /// Handle an item.
        /// </summary>
        /// <param name="xmlin">The XML input object.</param>
        public void HandleItem(ReadXML xmlin)
        {
            String name = xmlin.LastTag.GetAttributeValue(
                   TrainingContinuationPersistor.ATTRIBUTE_NAME);
            String str = xmlin.ReadTextToTag();
            double[] list = NumberList.FromList(CSVFormat.EG_FORMAT, str);
            this.current[name] = list;

        }
All Usage Examples Of Encog.Parse.Tags.Read.ReadXML::ReadTextToTag