[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: DOM - Creating Documents

  • From: "Jeff Greif" <jmg@t...>
  • To: "Ronald Bourret" <rbourret@i...>,<xml-dev@i...>
  • Date: Thu, 22 Apr 1999 09:09:38 -0700

txdocument
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@i...>
To: 'XML-DEV' <xml-dev@i...>
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@i...
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@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.