Hello.  I know this is a pretty rudimentary question,
but is there any difference between the following two
sets of code?:

// Sample 1
DocumentImpl doc = new DocumentImpl( );
ElementImpl ele = new ElementImpl(doc, "test");

// Sample 2
Document doc = new DocumentImpl( );
Element ele = doc.createElement("test");

Am I correct to assume that craeteElement( ) returns a
ElementImpl?  The second way is obviously better
because it removes the specific depencey in the code
on org.apache.xerces.dom.  Is there, however, a non
implementation specific way to factory the document? 
I'd like to be able to swap out the xerces parser for
another without changing my code.  Is this possible?
Thanks in advance!

-Jason 

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

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

Reply via email to