java - Filter XML stream using SAX -
i have xml stream want parse using sax. want echo out xml stream output stream, optionally filter out of tags or alter of attributes. there convenient "echo" contenthandler can leverage this?
yes. java trax/jaxp api's provide this. http://download.oracle.com/javaee/1.4/api/javax/xml/transform/package-summary.html http://download.oracle.com/javaee/1.4/api/javax/xml/transform/stream/streamsource.html http://download.oracle.com/javaee/1.4/api/javax/xml/transform/stream/streamresult.html
so you'd architect pipe follows:
sax input -> [ result | custom input] -> stream output
where [ result | custom input ] can simple class bridges necessary sax interfaces make contenthandler able provide input sax input source.
Comments
Post a Comment