/// <summary>
        /// Reads a <see cref="XmlNode"/> for an Ogmo Editor value.
        /// </summary>
        /// <param name="node">The <see cref="XmlNode"/> to read.</param>
        /// <returns>Returns a <see cref="ValueContent"/> object of the appropriate type if valid;
        /// otherwise, <c>null</c>.</returns>
        internal static ValueContent Read(XmlNode node)
        {
            ValueContent valueContent = null;

            switch (node.Name)
            {
            case "boolean":
                valueContent = new BooleanValueContent(node);
                break;

            case "integer":
                valueContent = new IntegerValueContent(node);
                break;

            case "number":
                valueContent = new NumberValueContent(node);
                break;

            case "string":
            // Fallthrough.
            case "text":
                valueContent = new StringValueContent(node);
                break;
            }
            return(valueContent);
        }
 internal static void Write(ContentWriter writer, ValueContent content)
 {
     if (content is BooleanValueContent)
     {
         BooleanValueContent bContent = content as BooleanValueContent;
         writer.Write("b");
         writer.Write(bContent.Name);
         writer.Write(bContent.Value);
     }
     else if (content is IntegerValueContent)
     {
         IntegerValueContent iContent = content as IntegerValueContent;
         writer.Write("i");
         writer.Write(iContent.Name);
         writer.Write(iContent.Value);
     }
     else if (content is NumberValueContent)
     {
         NumberValueContent nContent = content as NumberValueContent;
         writer.Write("n");
         writer.Write(nContent.Name);
         writer.Write(nContent.Value);
     }
     else if (content is StringValueContent)
     {
         StringValueContent sContent = content as StringValueContent;
         writer.Write("s");
         writer.Write(sContent.Name);
         writer.Write(sContent.Value);
     }
 }