private XmlNodeBuilder MakeRoot(XmlDocument workXml) { XmlNodeBuilder root = new XmlNodeBuilder(_rootName, workXml); root.AddAttributes(RootAttrs); return(root); }
public XmlNode ToXml(XmlDocument doc) { XmlNodeBuilder node = new XmlNodeBuilder(Name, doc); node.AddAttributes(Attrs); return(node); }
private XmlNode BuildNode(XmlDocument doc) { XmlNodeBuilder builder = new XmlNodeBuilder("error", doc); builder.AddAttribute("message", _error.Message); builder.AddAttribute("detail", _error.TargetSite == null ? _error.HelpLink : _error.HelpLink + "\n" + _error.TargetSite); builder.AddAttribute("source", _error.Source); builder.AddAttribute("stackTrace", _error.StackTrace); if (null != _error.InnerException) { ErrorDocument innerDoc = new ErrorDocument(_error.InnerException); ((XmlNode)builder).AppendChild(innerDoc.BuildNode(doc)); } return(builder); }