System.Data.XDRSchema.IsTextOnlyContent C# (CSharp) Method

IsTextOnlyContent() private method

private IsTextOnlyContent ( XmlElement node ) : bool
node System.Xml.XmlElement
return bool
        internal bool IsTextOnlyContent(XmlElement node)
        {
            Debug.Assert(FEqualIdentity(node, Keywords.XDR_ELEMENTTYPE, Keywords.XDRNS), "Invalid node type " + node.LocalName);

            string value = node.GetAttribute(Keywords.CONTENT);
            if (value == null || value.Length == 0)
            {
                string type = node.GetAttribute(Keywords.DT_TYPE, Keywords.DTNS);
                return !string.IsNullOrEmpty(type);
            }

            if (value == Keywords.EMPTY || value == Keywords.ELTONLY || value == Keywords.ELEMENTONLY || value == Keywords.MIXED)
            {
                return false;
            }
            if (value == Keywords.TEXTONLY)
            {
                return true;
            }

            throw ExceptionBuilder.InvalidAttributeValue("content", value);
        }