Paulo,
Não sei se ajuda, mas existe maneiras de minificar (que é um pouco diferente de comprimir ou compactar) o arquivo XML.
Exemplos:
==========================================================
HT.Minify by: HTTeam
Markup, HTML, XHTML, XML, Minification, Minifier, Minify Config in Startup.cs: - void ConfigureServices: services.AddMinResponse(); - void Configure: app.UseMinResponse();
https://www.nuget.org/packages/HT.Minify
==========================================================
WebMarkupMin.AspNet4.Mvc
WebMarkupMin.AspNet4.Mvc contains 4 action filters: MinifyHtmlAttribute
(for minification of HTML code), MinifyXhtmlAttribute
(for minification of XHTML code), MinifyXmlAttribute
(for minification of XML code) and CompressContentAttribute
(for compression of text content by using GZIP or Deflate).
https://www.nuget.org/packages/WebMarkupMin.AspNet4.Mvc
==========================================================
Ferramenta on-line de compactação XML
Comprimir strings XML em Java (com pacote dom4j):
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.io.OutputFormat;
import org.dom4j.io.XMLWriter;
public String minify(String xmlStr){
Document document=DocumentHelper.parseText(xmlStr);
OutputFormat format=OutputFormat.createPrettyPrint();
StringWriter stringWriter=new StringWriter();
XMLWriter writer=new XMLWriter(stringWriter,format);
writer.write(document);
String resultStr=stringWriter.toString();
return resultStr;
}
https://coding.tools/pt/xml-minifier
==========================================================
Este é em ZIP... compactação
Comprimir XML
https://www.compresss.com/pt/compress-xml.html
==========================================================
[]'s,
Fabio I.