Why the same Resource can't be seen as SAX events, Stream, DOM tree or
String ?
Then, these methods could be on the Resource.

-----Message d'origine-----
De : Kimbro Staken [mailto:[EMAIL PROTECTED]
Envoy� : mercredi 25 avril 2001 00:47
� : [EMAIL PROTECTED]
Objet : Re: Implementation feedback


Ronald Bourret wrote:
> 
> Kimbro Staken wrote:
> >
> > It can but this is mainly used to switch what representation you want
> > for XML. e.g. SAX, DOM, Text. This is definitely the one thing about the
> > API that I'm not really happy with.
> >
> > The use case looks like.
> >
> > Collection collection = DatabaseManager.getCollection("some db uri");
> >
> > // tell the API you want a DOMNodeResource when you call getResource()
> > collection.setResourceType("DOMNode");
> >
> > String id = "gladiator-2000";
> > DOMNodeResource resource = (DOMNodeResource) collection.getResource(id);
> > Document doc = (Document) resource.getContent();
> 
> I (still) haven't had a chance to look at the new API, but I had assumed
> we would simply have different methods her -- something like the
> following. (Pardon my Java-isms ;)
> 
>    void Collection.getSAXResource(id, contentHandler);
>    Document Collection.getDOMResource(id);
>    String Collection.getStringResource(id);
>    byte[] Collection.getBinaryResource(id);
> 

That was probably the biggest change in the new API. It uses a Resource
abstraction to eliminate all the different methods and make particular
resource type support (other then text XML) optional.


-- 
Kimbro Staken
Chief Technology Officer
dbXML Group L.L.C
http://www.dbxmlgroup.com

----------------------------------------------------------------------
Post a message:         mailto:[EMAIL PROTECTED]
Unsubscribe:            mailto:[EMAIL PROTECTED]
Contact adminstrator:   mailto:[EMAIL PROTECTED]
Read archived messages: http://archive.xmldb.org/
----------------------------------------------------------------------


========================================================================= 
Ce message et toutes les pi�ces jointes sont propri�t� de VALTECH et 
susceptibles de contenir des informations confidentielles � l'intention 
exclusive de ses destinataires. Si vous avez re�u ce message par erreur 
ou si celui ci vous est parvenu incomplet ou alt�r�, merci d'en avertir 
l'exp�diteur par retour.Toute utilisation, diffusion ou publication non 
express�ment autoris�e par nous par �crit est strictement interdite. 
 -------------------------------------------------------------------------- 
This message and any attachments are Valtech property and may contain 
iconfidential information intended solely for the addressees. If your are 
not the intended recipient of this message or if you have received it 
uncomplete or altered, please notify the author by replying to his e-mail 
immediately. Any unauthorised use, diffusion or dissemination not 
expressly authorised by us in writing is strictly prohibited. 
========================================================================= 
Copyright Valtech 2000 



----------------------------------------------------------------------
Post a message:         mailto:[EMAIL PROTECTED]
Unsubscribe:            mailto:[EMAIL PROTECTED]
Contact adminstrator:   mailto:[EMAIL PROTECTED]
Read archived messages: http://archive.xmldb.org/
----------------------------------------------------------------------

Reply via email to