[XML-SIG] Hopefully a quick question

William Baxter bbaxter@wadsworth.org
Fri, 05 Apr 2002 16:34:50 -0500


I would like to access the elements themselves from a document. The SAX
and DOM interfaces allow one to extract the text inside the markup, but
I don't see how to recover the original markup.

E.g., can I obtain a string like "<object attrib=x attrib2=y>text
stuff</object>" from a DOM tree? I can see how to get all the pieces -
the tag name, the attributes, the text - but not how to get the entire
element. Or do I have to walk  through the tree getting all the parts,
and reconstructing the element as I go? That seems like a lot of
trouble, when somewhere the parser must have this thing already.

Thanks,
Bill Baxter