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

copyEventFromReader() Processing Instruction event bug #132

Closed
dan2097 opened this issue Oct 20, 2021 · 3 comments
Closed

copyEventFromReader() Processing Instruction event bug #132

dan2097 opened this issue Oct 20, 2021 · 3 comments
Milestone

Comments

@dan2097
Copy link

dan2097 commented Oct 20, 2021

Tested with v6.2.6. The code below outputs :
<description<?pi ?>>foo</description>
which I believe is malformed as the processing instruction event is within the start element.

String in = "<description><?pi?>foo</description>";
XMLStreamReader2 reader = (XMLStreamReader2) new WstxInputFactory().createXMLStreamReader(new StringReader(in));
ByteArrayOutputStream baos = new ByteArrayOutputStream();
XMLStreamWriter2 writer = (XMLStreamWriter2) new WstxOutputFactory().createXMLStreamWriter(baos, "UTF-8");
while (reader.hasNext()) {
  reader.next();
  writer.copyEventFromReader(reader, true);//true or false give same result
}
writer.close();
System.out.println(baos.toString("UTF-8"));
@cowtowncoder
Copy link
Member

Thank you for reporting this -- I hope to find time in near future to look into this; it does sound like a bug indeed.

@cowtowncoder cowtowncoder changed the title copyEventFromReader Processing Instruction event bug copyEventFromReader() Processing Instruction event bug Nov 20, 2021
@cowtowncoder cowtowncoder added this to the 6.2.7 milestone Nov 20, 2021
@cowtowncoder
Copy link
Member

Ok; took a while to find time, and then a bit more to isolate the problem but I found it & fix is checked in now.
Will see if there is anything else before releasing 6.2.7

@cowtowncoder
Copy link
Member

Decided time was ripe, so just released version 6.2.7. Should be up at Maven Central soon.

Also filed new issues for dependency upgrade for OSGi.core & JDK baseline upgrade to Java 8 -- so considering 6.3.0 release in near future -- with only dependency upgrades.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants