Try this: XML SET OPTIONS($rootRef_t;XML indentation;XML no indentation) Jim Hays
On Mon, Mar 9, 2020 at 2:57 PM Tom Benedict via 4D_Tech < [email protected]> wrote: > I am updating values in an XML file using DOM commands. I finish by > calling DOM EXPORT TO FILE. What I’ve found is that the end-of-line chars > in the XML file are doubled every time I export, so eventually there is > lots of white space between lines in the document. According to the > documentation this appears to be a ‘feature’. The documentation, shown > below, describes how to deal with it, but I don’t understand it. I want to > be able to browse my XML document with a text editor (NotePad or Notepad++) > so I do not want extra end-of-line characters added to my document. > > From the documentation at > https://doc.4d.com/4Dv16/4D/16.6/DOM-EXPORT-TO-FILE.301-4445841.en.html < > https://doc.4d.com/4Dv16/4D/16.6/DOM-EXPORT-TO-FILE.301-4445841.en.html>: > --------------------------------------------------------------- > Notes about processing end-of-line characters <> > In XML, line breaks are not significant regardless of whether they are > within or between XML elements. Internally, XML uses standard LF characters > as line separators. > During import and export operations, line break characters can be > converted. During an import, the XML parser replaces CRLF characters > (standard line breaks under Windows) with LF characters. During export, LF > characters are replaced by CR characters on macOS and CRLF characters on > Windows. > If you want to keep carriage returns, you must include them in an XML > CDATA element so that they will not be processed by the XML parser. Instead > of CRLF characters, you can also use "<br/>" characters, which are explicit > carriage returns that will not be processed by the parser. > ——————————————————————————————— > > This seems to say that import converts CRLF to LF, then export changes > them back. So why in my case are the CRLFs accumulating? Can someone > provide some guidance on what I need to do to avoid additional end of line > characters being added to my XML? I think there is some basic knowledge > which I am lacking.Where would I add the "<br/>” characters? > > BTW, the XML I am editing is the BuildApp.xml used by 4D. > > Thanks, > > Tom Benedict > > > ********************************************************************** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:[email protected] > ********************************************************************** ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

