commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitri Plotnikov <dmi...@apache.org>
Subject Re: [JXPath] deprecated doc
Date Fri, 29 Apr 2005 14:11:12 GMT
Pedro,
 
You have two choices:
 
1. You can simply parse the XML with a DOM parser or JDOM and use the resulting Document as
the context root for JXPath.  You don't have to use a Container to access DOM or JDOM.  The
purpose of Container is to perform lazy parsing, i.e. only parse the document if it is traversed
by an XPath.
 
2. If you do need that lazy behavior, you can create your own implementation of the Container
interface or a subclass of DocumentContainer.
 
In any case, it's probably a good idea to add a constructor with a String argument to DocumentContainer.
 I will do that in the near future.
 
Regards,
 
- Dmitri

Pedro Cristian <pedro_cristian@yahoo.fr> wrote:
--- Dmitri Plotnikov a écrit : 
> Pedro,
> 
> The class is now called simply DocumentContainer.
> 
> I will update the documentation when I get a chance.
> 
> Thank you,
However DocumentContainer does not have a constructor with a Source. Just with
an URL. Or is there a way that I don't know in order to transform an internal
String into an URL (without using a File)?

Pedro








__________________________________________________________________ 
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message