So basically there isn't anything I can do to extend Xerces other than going into the its source and creating a custom createNodeIterator function?

Yes, I've tried this too. It would very useful to be able to type elements
correctly in a java environment. It makes the handling easier and safer.
Unfortunately, the xerces implementations use a complex inheritance
structure for their elements. The "deferred Node" implementations allow DOM
nodes not to be fully expanded until they are required. The downside is that
casts between xerces elements and whatever subclasses of ElementImpl you
write will fail if that element has not been fully expanded. Nor will it
help to try subclassing the "deferred" heirarchy. The truth is that xerces
implementations are so tightly dependent on the xerces framework that
extension is hardly worth the effort.

Although I haven't really solved this problem to my satisfaction yet, it
might involve the containment of an org.w3c.dom type in a proxy of some
sort. That perhaps implies one proxy class for every element type you are
concerned with, and a graph of types matching a particular schema.

Alternatively, check out the tiny, elegant, fast NanoXml at
http://nanoxml.sourceforge.net/
No problems extending that.

-- Tobias McNulty Data Description, Inc. 840 Hanshaw Road, Suite 9 Ithaca, NY 14850 Phone: (607) 257-1000 E-mail: [EMAIL PROTECTED] Web: www.datadesk.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to