private static XmlDocument ToXml(T document, params string[] tagNames) { using (var stream = new StringWriter()) { return(XmlDocumentExtensions.LoadXmlDocumentFromXmlStream(document, stream) .RepairRepeatedTag("NF") .RepairRepeatedTag("desc") .RepairRepeatedTag("obs")); } }
private static XmlDocument ToXml(T document, bool tagId = false) { using (var stream = new StringWriter()) { return(XmlDocumentExtensions.LoadXmlDocumentFromXmlStream(document, stream) .GenerateIdForTagName(tagId, "NumeroNF") .GenerateIdForTagName(tagId, "NF") .GenerateIdForTagName(tagId, "desc") .GenerateIdForTagName(tagId, "obs") .GenerateIdForTagName(tagId, "des") .RepairSelfClosingTag("PlanoInterno") .RepairRepeatedTag("repeticao") .RepairRepeatedTag("desc") .RepairRepeatedTag("linha") .RemoveTag("string")); } }