Skip to content

Losing the xml tag when sending document #210

Answered by L3Mars
yvansteene asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks ! we are so dumb..

when receiving document, there's is a specific configuration of the serializer for remove xml declaration

		DOMImplementationLS lsImpl = (DOMImplementationLS) ublDocument.getOwnerDocument().getImplementation().getFeature("LS", "3.0");
		LSSerializer serializer = lsImpl.createLSSerializer();
		serializer.getDomConfig().setParameter("xml-declaration", false);

Removing the last line fix the problem.
Sorry for the inconvenience.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@phax
Comment options

phax Jan 17, 2024
Maintainer

@L3Mars
Comment options

@phax
Comment options

phax Jan 17, 2024
Maintainer

@L3Mars
Comment options

Answer selected by phax
@phax
Comment options

phax Jan 18, 2024
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants