You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "Swanson, Brion" <Br...@westgroup.com> on 2001/06/18 14:52:12 UTC
serializing XML document header info
Is there a way for me to programmatically add comment nodes to the "header"
of an DOM tree?
That is, when a DOM tree is serialized, it generally writes out information
close to the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE doc SYSTEM "doc.dtd">
<doc>
<element/>
</doc>
What I want is to add a comment node before the 'doc' element so that my
serialized document looks like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE doc SYSTEM "doc.dtd">
<!-- This file has been automatically generated -->
<doc>
<element/>
</doc>
How might I go about doing this?
Thank you.
--------------
Brion Swanson
Software Engineer (Co-op)
West Group - Public Records
Brion.Swanson@westgroup.com
716-327-6164 (x6164)