Skip to content

Commit ea42959

Browse files
committed
...
1 parent cdda050 commit ea42959

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/main/java/tools/jackson/dataformat/xml/ser/ToXmlGenerator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ public void initGenerator() throws JacksonException
266266
_xmlWriter.writeStartDocument(encoding, xmlVersion);
267267
}
268268
// 20-Apr-2026, tatu: for legacy path, only output prolog lf when pretty-printing
269+
// OR _lfBetweenPrologDirectives passed by initializer
269270
if (_lfBetweenPrologDirectives || _xmlPrettyPrinter != null) {
270271
_prologLinefeed();
271272
}

src/main/java/tools/jackson/dataformat/xml/ser/XmlGeneratorInitializer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
* {@link ObjectWriter#with(GeneratorInitializer)}.
1717
* It allows output of various document-level things such as
1818
*<ul>
19-
* <li>Document Type Declarations (DTD); that is "&lt;!DOCTYPE>" directive
19+
* <li>Document Type Declarations (DTD); that is "&lt;!DOCTYPE>" directive
20+
* </li>
21+
* <li>XML Comments (in Document prolog, before the root element)
2022
* </li>
2123
* </ul>
2224
*<p>

0 commit comments

Comments
 (0)