You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Shreeya Indap <mm...@hotmail.com> on 2003/09/29 20:25:06 UTC
How to delete elements with SAX?
Hello All,
One of our requirements from the xml pipeline is to filter out blocked
elements. I know with DOM it is just a matter of removing nodes from DOM
tree but if possible I want to implement this functionality with SAX.
The filter I am writing works as a contentHandler and takes in 'rules.xml'
as its input that contains ids of 'to be' blocked elements. The input source
in the pipe generates SAX events and now on each startElement event I want
to check if that element is listed in rules.xml as blocked and then
terminate further processing of this element and move on to next one.
Is it possible to do this using SAX? or I have to use DOM if want to delete
elements like this.
Thank you,
Meghana Joglekar
Merant, Inc.
_________________________________________________________________