/// <summary> /// Load from the deprecated XML serialized scheme /// </summary> /// <param name="data">Data string to deserialize using XMLSerializer</param> /// <returns>TreeView LinkNode</returns> private static LinkNode LoadConfigFromStringXML(string data) { LinkNode baseNode = null; if (!string.IsNullOrWhiteSpace(data)) { XmlSerializer serializer = new XmlSerializer(typeof(SerialNode)); XmlTextReader textReader = new XmlTextReader(new StringReader(data)); SerialNode sNode = (SerialNode)serializer.Deserialize(textReader); textReader.Close(); baseNode = sNode.BuildLinkNodeFromSerialNode(); } return(baseNode); }
/// <summary> /// Load from the deprecated XML serialized scheme /// </summary> /// <param name="data">Data string to deserialize using XMLSerializer</param> /// <returns>TreeView LinkNode</returns> private static LinkNode LoadConfigFromStringXML(string data) { LinkNode baseNode = null; if (!string.IsNullOrWhiteSpace(data)) { XmlSerializer serializer = new XmlSerializer(typeof(SerialNode)); XmlTextReader textReader = new XmlTextReader(new StringReader(data)); // Not reading external files, so this can set to prohibit. Resolves CA3075 textReader.DtdProcessing = DtdProcessing.Prohibit; SerialNode sNode = (SerialNode)serializer.Deserialize(textReader); textReader.Close(); baseNode = sNode.BuildLinkNodeFromSerialNode(); } return(baseNode); }