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: <5.0.0.25.2.20010521152328.00a68af0@pop.enteract.com>
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.

Regards,
Gavin
Received on Monday, 21 May 2001 18:42:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:48 GMT