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
[EMAIL PROTECTED]
716-327-6164 (x6164)

 

Reply via email to