Methods Request

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