Upayavira wrote:
> Maybe my last question was too specific.
>
> I'm trying to parse the contents of a source into a DOM in Flowscript,
> but am getting all sorts of errors. Can anyone provide a better way
> than this (which doesn't work)?
>
>  var resolver =
>
cocoon.getComponent(Packages.org.apache.excalibur.source.SourceResolver.
ROLE);
>
>  var source = resolver.resolveURI("blah.xml");
>  var builder =
>
Packages.javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocum
entBuilder();
>
>  var is = source.getInputStream();
>  var dom = builder.parse(source.getInputStream());

Sorry, I have no idea why that doesn't work. I just use

var dom =
Packages.org.apache.cocoon.components.source.SourceUtil.toDOM(source);

HTH
Guido




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


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

Reply via email to