On 2023-04-26 15:39, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-04-26 13:18, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-04-26 12:47, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-04-26 08:45, Per Jessen wrote: > Carlos E. R. wrote: >> (Can I write comments in xml file >> /etc/firewalld/zones/external.xml?) > > Yes, use "<!-- comment -->". Can span multiple lines.
Ah. Thanks.
Ah, Andrei notes that perhaps they will not be preserved. Ok, I can only try.
It depends on how that file is being managed - if individual elements are being added/removed, your comments might well be kept - but if the XML format is only used as storage, your comments most probably won't be kept.
Then the file should have a machine written comment at the top: do not edit, automatically generated file.
Frankly, no. XML is easily formatted to be human readable, but it is most often not intended as such. If you are editing XML, unless it is e.g. an XSLT stylesheet or an HTML page, you should assume it was produced by some code. IMHO.
Other software produce precisely that line.
In XML ?
I don't remember all the file types where I saw this. /usr/share/mobile-broadband-provider-info/apns-conf.xml <?xml version="1.0"?> <!-- Automatically generated from serviceproviders.xml --> /usr/share/flightgear/Aircraft/Instruments-3d/mk-viii/caution0.xml <?xml version="1.0"?> <!--automatically generated, do not edit--> :-) (I found them using 'mc' ;-) ) -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)