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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Help w/Docuverse DOM SDK (Please)

[ Lists Home | Date Index | Thread Index ]
  • From: Buzz Andersen <landerse@du.edu>
  • To: xml-dev@ic.ac.uk
  • Date: Wed, 10 Mar 1999 23:40:42 -0700

Whoa...that was a mistranslation from my original code!  It was supposed to
read:

x.appendChild(y);

Sorry about the confusion, and thanks much for the advice/code.  I've been
generating XML for awhile using proprietary parser APIs, but I'm still
trying to grok the whole SAX/DOM thing.

Buzz Andersen
www.du.edu/~landerse
landerse@du.edu

----------
>From: Don Park <donpark@quake.net>
>To: xml-dev@ic.ac.uk
>Subject: Re: Help w/Docuverse DOM SDK (Please)
>Date: Wed, Mar 10, 1999, 10:58 PM
>

>Buzz,
>
>>DOM dom = new com.docuverse.dom.DOM();
>>dom.setProperty("sax.driver", "com.ibm.xml.parser.SAXDriver");
>>Document x = dom.createDocument("e1");
>>Element y = x.createElement("e2");
>>y.appendChild(root);
>>
>>I would think this would generate:
>>
>><e1>
>>   <e2></e2>
>></e1>
>
>I don't know what y.appendChild(root) is supposed to be but you have to
>insert your "e2" element into your document.
>
>// creates a document with "e1" as document element
>Document doc = dom.createDocument("e1");
>
>// make sure document root exists
>Node e1 = doc.getDocumentElement();
>if (e1 == null)
>    e1 = doc.appendChild(doc.createElement("e1"));
>
>// create and insert e2 into e1
>e1.appendChild(doc.createElement("e2"));
>
>at this point, you will have:
>
><e1><e2/></e1>
>
>Best,
>
>Don Park
>Docuverse
>
>
>
>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)
>

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