Right now, the getDocument() function looks like:

    public Object getDocument(String uri) throws FunctionCallException
    {
        try
        {
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            factory.setNamespaceAware(true);
            DocumentBuilder builder = factory.newDocumentBuilder();
            return builder.parse( uri );
        }
        catch (Exception e)
        {
            throw new FunctionCallException("Failed to parse doucment for URI: " + 
uri, e);
        }
    }

I would like to suggest the following enhancements:

1) Cache the DocumentBuilderFactory and/or DocumentBuilder once created.  (What is the 
status of a Navigator with respect to threads?)
2) Supply a method to register an EntityResolver instance with the Navigator so that 
custom resolution is possible.

I'll implement them and submit some code if there is agreement on what to do across 
the different navigators.

Thanks in advance.

Paul Brown
http://www.fivesight.com 

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Jaxen-interest mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jaxen-interest

Reply via email to