Ulp; no wonder folks would rather do this in XSP - it
might not be the "best" way but it is surely a *lot* easier...
is it even feasible to upgrade the functionality of
JXTemplate to simplify this kind of extraction (in the way 
envisaged by the original poster)?

Derek

>>> [EMAIL PROTECTED] 2004/06/03 10:03:44 AM >>>

Le 3 juin 04, � 09:50, Derek Hohls a �crit :

> Bertrand
>
> Is there a concrete example in the Cocoon samples
> (or the Wiki)  that "fleshes out" this approach in a little
> more detail?

Maybe not, but here are some code excerpts:

   import org.apache.excalibur.xml.dom.DOMParser;
   import org.w3c.dom.Document;
   import org.xml.sax.InputSource;

     ServiceManager manager;
    (obtained via Serviceable or something)

     public Document stringToDOM(String input) throws Exception {
         Document result = null;
         DOMParser parser = null;
         try {
             parser = (DOMParser)manager.lookup(DOMParser.ROLE);
             result = parser.parseDocument(new InputSource(new 
StringReader(input)));
         } finally {
             manager.release(parser);
         }
         return result;
     }

You could also do it directly from Flowscript by using 
cocoon.createComponent to do the lookup.

-Bertrand


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



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


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

Reply via email to