|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: DOM - Creating Documents
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








