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?


Daniel Aborg wrote:
It would be somewhat easier to convert SAX event sequence to a Node,
since there is ready code for this: I just need to write an appropriate
10-line glue method.  Will that work for you?
That would be great.

Sorry for not replying sooner - actually a single function makes no sense. Instead 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!
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


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