This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Converting DOM to Qexo Infoset?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]