Getting a SAX stream from JTidy

Hello,

Is it possible to derive a SAX stream from JTidy ?
I want to further parse the output of parseDOM, and feel that a SAX
processing of the
tree would help.

Alternativly, I tried to parse the output of a *clean* document tree
generated by JTidy using JAXP,
but that did not work. I guess its because when JTidy builds its  DOM tree,
it is more
forgiving than other parsers.


What i really want to do is extract the text block from the example
below :

<SCRIPT>

    <!-- MARK -->
        Text block to be parsed
    <!-- /MARK -->

</SCRIPT>

The DOM tree does not give me offsets into the file for nodes , so I cannot
determine
at what position to cut the text from.


Thanks
Shahed

Received on Wednesday, 8 January 2003 12:40:56 UTC