OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: DOM - Creating Documents

[ Lists Home | Date Index | Thread Index ]
  • From: "Jeff Greif" <jmg@trivida.com>
  • To: "Ronald Bourret" <rbourret@ito.tu-darmstadt.de>,<xml-dev@ic.ac.uk>
  • Date: Thu, 22 Apr 1999 09:09:38 -0700

Snarfed from the very useful guide.html that came with the IBM xml4j
(version 1.1.9) distribution
(the documentation has changed in later versions, and I haven't looked for
the replacement.):

<Quotation>
Creating a new XML document is a three step process. First, create the
TXDocument, which is the concrete implementation of Document. Second, create
the various XML objects using the TXDocument's create* methods. Finally, use
appendChild to append these appropriately to the TXDocument or sub-Elements.
Make a TXDocument instance.

TXDocument doc = new TXDocument();


 Create something, a DTD or root Element.
        Element root = doc.createElement("ROOT"));

Append  the newly created Element.
        doc.appendChild(root);

Append something to the root Element you have added.

      root.appendChild(doc.createElement("FOO"));
</Quotation>



----- Original Message -----
From: Ronald Bourret <rbourret@ito.tu-darmstadt.de>
To: 'XML-DEV' <xml-dev@ic.ac.uk>
Sent: Thursday, April 22, 1999 4:55 AM
Subject: Re: DOM - Creating Documents


>
> 2) Is it really not possible to create a new Document with IBM's classes?
>  I can't find a method for doing it.
>



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS