XmlSerializer: The string ” is not a valid AllXsd value

I solved the issue by storing the date in string and then creating a getter which parses the date and returns it as DateTime.

Sample code:

    [XmlElement("Valid")]
    public string _Valid
    {
        get;
        set;
    }

    [XmlIgnore]
    public bool? Valid
    {
        get
        {
            if (!string.IsNullOrWhiteSpace(_Valid))
            {
                return bool.Parse(_Valid);
            }

            return null;
        }
    }

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)