LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives


XML-L Archives

XML-L Archives


View:

Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font

Options:

Join or Leave XML-L
Reply | Post New Message
Search Archives


Subject:

Insert a comment in the header of a document

From:

Eddy Fras <[log in to unmask]>

Reply-To:

General discussion of Extensible Markup Language <[log in to unmask]>

Date:

Thu, 6 Dec 2001 18:00:28 +0100

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (21 lines)


Hi all,

I'm desperatly trying to insert a comment in a DOM tree between the xml declaration and the root element, something like :

<?xml version="1.0" ?>
<!-- My comment -->
<root>
...

I've tried in Java the following stuff :

Comment comm = doc.createComment("My comment");
doc.insertBefore(comm, doc.getFirstChild());

... but it does not work.

Any help would be welcome !

Thanks a lot,

Eddy Fras


Back to: Top of Message | Previous Page | Main XML-L Page

Permalink



LISTSERV.HEANET.IE

CataList Email List Search Powered by the LISTSERV Email List Manager