Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Writing DTD Element To XML File

digi_pixelMay 1 2011 — edited May 4 2011
SVG is being used as the save file format for a new application under development. XMLStreamWriter class is being used to write an XML file. Everything has been written correctly except for the DTD element. The writeEmptyElement method from XMLStreamWriter would be ideal if it wasn't for the "/" being written just before the ">"

XMLStreamWriter has the writeDTD method but it doesn't properly write a DTD element. Below is the DTD element that needs to be written to the SVG file:

*<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"*
*"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">*
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 1 2011
Added on May 1 2011
7 comments
654 views