public override System.Xml.XmlNode ToXMl(System.Xml.XmlDocument data) { if (this.Value != null) { XmlDocument xd = new XmlDocument(); try { xd.LoadXml(this.Value.ToString()); return data.ImportNode(xd.DocumentElement, true); } catch { return base.ToXMl(data); } } else { return base.ToXMl(data); } }
public override System.Xml.XmlNode ToXMl(System.Xml.XmlDocument data) { if (this.Value != null && !String.IsNullOrEmpty(this.Value.ToString())) { XmlDocument xd = new XmlDocument(); xd.LoadXml(this.Value.ToString()); return data.ImportNode(xd.DocumentElement, true); } else { return base.ToXMl(data); } }
public override System.Xml.XmlNode ToXMl(System.Xml.XmlDocument data) { XmlDocument xd = new XmlDocument(); try { xd.LoadXml(this.Value.ToString()); } catch (Exception e) { xd.LoadXml(defaultXML); } return data.ImportNode(xd.DocumentElement, true); }
public override System.Xml.XmlNode ToXMl(System.Xml.XmlDocument data) { XmlDocument xd = new XmlDocument(); try { xd.LoadXml(this.Value.ToString()); } catch (Exception e) { string initialValue = "<list><item indent=\"0\"/></list>"; xd.LoadXml(initialValue); } return data.ImportNode(xd.DocumentElement, true); }