Something like:
myWriter.write("<?xml version=\"1.0\" encoding=\"UTF-8\"
standalone=\"no\"?>\n");
myWriter.write("<!DOCTYPE GatewayRequest SYSTEM \"http://gateway.dtd\">\n");
Marshaller m = new Marshaller(myWriter);
m.setMarshalAsDocument(false);
m.marshal(myObject);
Should do the trick,
--Keith
Michael Fork wrote:
All,
I need my generated XML to look like this:
<?xml version="1.0" encoding="UTF-8" standalone="no"
?>
<!DOCTYPE GatewayRequest SYSTEM "http://gateway.dtd">
but all I have managed is this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE GatewayRequest SYSTEM "http://gateway.dtd">
How do I get the standalone="no" to print out?
I tried making the following the start of my mapping
file with no luck:
<?xml version="1.0" encoding="UTF-8" standalone="no"
?>
<mapping>
Thanks.
Michael
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------