Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSoup Created XML Document Contains Invalid XML Declaration String #652

Closed
lyleholt opened this issue Nov 9, 2015 · 1 comment
Closed
Labels
bug Confirmed bug that we should fix
Milestone

Comments

@lyleholt
Copy link

lyleholt commented Nov 9, 2015

When creating an XML document using JSoup, the XML declaration that is output is missing the closing question mark

Example code:

Document document = Document.createShell("");
document.outputSettings().syntax(Syntax.xml);
document.charset(Charset.forName("utf-8"));
System.out.println(document.html());

which outputs:

<?xml version="1.0" encoding="UTF-8">
<html>
 <head></head>
 <body></body>
</html>

Expected output:

<?xml version="1.0" encoding="UTF-8"?>
<html>
 <head></head>
 <body></body>
</html>
@jhy jhy added this to the 1.9.2 milestone May 7, 2016
@jhy jhy added the bug Confirmed bug that we should fix label May 7, 2016
@jhy
Copy link
Owner

jhy commented May 7, 2016

Fixed by 4eb4f2b

@jhy jhy closed this as completed in c090381 May 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug that we should fix
Projects
None yet
Development

No branches or pull requests

2 participants