-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
duplicateThis is a duplicate issue or root-cause of another issueThis is a duplicate issue or root-cause of another issuefixedAn {bug|improvement} that has been {fixed|implemented}An {bug|improvement} that has been {fixed|implemented}
Description
Hi,
We recently upgraded from 1.18.1 to 1.18.2 and namespaces in xml are removed during parse.
Document doc = Jsoup.parse(new ByteArrayInputStream("<?xml version=\"1.0\" encoding=\"UTF-8\"?><test1><test xmlns:p1=\"test-namespace\"> </test></test1>".getBytes("UTF-8")),
"UTF-8", "", Parser.xmlParser());
doc.outputSettings().charset("UTF-8");
doc.outputSettings().escapeMode(Entities.EscapeMode.xhtml);
System.out.println(doc.toString());The result was
<?xml version="1.0" encoding="UTF-8"?><test1><test xmlns:p1="test-namespace"> </test></test1>in 1.18.1
But with 1.18.2:
<?xml version="1.0" encoding="UTF-8"?><test1><test> </test></test1>Is there any configuration to keep the namespaces?
Metadata
Metadata
Assignees
Labels
duplicateThis is a duplicate issue or root-cause of another issueThis is a duplicate issue or root-cause of another issuefixedAn {bug|improvement} that has been {fixed|implemented}An {bug|improvement} that has been {fixed|implemented}