W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1999

Methods Request

From: Andrew n marshall <amarshal@zig.usc.edu>
Date: Wed, 17 Nov 1999 14:57:05 -0500 (EST)
To: www-dom@w3c.org
Message-ID: <Pine.LNX.4.04.9911171138440.13324-100000@zig.usc.edu>

Here are two method I'm looking for, mostly for debug purposes:

   DOMString Element.getStartTag();
   DOMString Element.getEndTag();

I know they can both be created with the existing DOM (that is what I'm
currently using), at least it terms of the logical structure.  What you
can't do is recreate an empty element from the DOM.

In the case that the original XML document's element (assuming it came
from a standard XML document and was not dynamically generated),
getStartTag() should return "<TagName ATTRs... />", and getEndTag() should
return an empty string.

Where I'm using this is in reporting errors encountered in the XML
documents semantics to the user and I want to match the original notation
as closely as possible.  Sun's DOM implementation includes the toString()
method (also very useful), it includes all the child elements as well.



PS - I'm not a part of this mailing list (I used to be), so if you have
any useful comments directed to me, please include my above address in the
CC: line of the mail header, or write them to me directly.  Thanks.
Received on Friday, 19 November 1999 08:02:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:36:45 UTC