Converting DOM to Qexo Infoset?

Daniel Aborg lists.kawa@daborg.fastmail.fm
Thu May 3 18:32:00 GMT 2007


Per Bothner wrote:
> try:
>   import gnu.xml.*;
>   import gnu.kawa.xml.*;
>
>   NodeTree tree = new NodeTree();
>   XMLFilter filter = new XMLFilter(tree);
>
> Then stream SAX events to filter - XMLFilter
> implements both DocumentHandler and ContentHandler.
>
> Then:
>   return KNode.make(tree);
>
> I haven't actually tested this, so you might expose
> some bugs!
Works so far, most of my queries work now. I've figured out that I can 
use the ContentConsumer to convert the resulting KDocuments into DOM 
Documents via SAX.

However, I'm wondering if there is a Kawa distribution where KNode and 
friends are compiled to implement the DOM interfaces directly? Looks 
like that is an option based on the sources.

Thanks for your help,

Daniel



More information about the Kawa mailing list