W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2001

DOM - odd absent tag-setting method

From: Gavin Stokes <gavin@AmbitiousProductions.com>
Date: Mon, 21 May 2001 15:43:19 -0700
Message-Id: <>
To: W3C DOM mailing list <www-dom@w3.org>
Thanks to all for the responses.  I just want to be able to pass empty 
elements into subroutines, have them filled (including tag), and then add 
the resulting elements to an XML doc.

Not being able to change the tag will make it harder to break the code into 
tidy routines that take a C++ object and and turn it into an 
element.  Let's say I have a bunch of overloaded methods in an XML 
generator called ObjectToXML(const ClassName&, DOM_Element*).

I'd simply like to set the tag to be the class name.  Because this same 
type of object may be stored at various levels and places in one XML 
document, passing the entire document itself is not attractive.  The 
subroutine should not have any knowledge of where the resulting XML is 
going in the big document.  It would be nice to build elements individually 
at the behest of a higher-level routine, which would be assembling them 
into the document.

Of course, I don't know the inner workings of element-generation as some of 
you do, so if they're actually different classes generated at runtime then 
maybe what I want is impractical.

Received on Monday, 21 May 2001 18:42:12 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:08 UTC