XMLStreamWriter remove prolog
Asked Answered
G

1

6

I'm writing an xml using XMLStreamWriter. But I do not need the prolog.

<?xml version="1.0" ?>

How can I omit this line in my output xml.

Government answered 24/9, 2015 at 13:14 Comment(0)
G
9

XMLStreamWriter outputs the XML declaration when you call writeStartDocument().

So you can simply skip this call if you don't want to include a XML declaration.

Gautea answered 24/9, 2015 at 13:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.