|
Hi Knut
This is a SAX / JAXP question really I guess but
I'll try help. There's some similar code to do this already in dom4j. Its in
SAXReader in the installXMLFilter method at line 579. The code block
is...
// add a new xmlFilter to the
xmlReader's pipeline...
XMLReader
xmlReader;
XMLFilter xmlFilter ...;
if (
xmlFilter != null )
{
// find the root XMLFilter XMLFilter root = xmlFilter; while (true) { XMLReader parent = root.getParent(); if ( parent instanceof XMLFilter ) { root = (XMLFilter) parent; } else { break; } } root.setParent(xmlReader); i.e. that the XMLReader is the topmost
parent.
Does this help you at all?
James
|
- [dom4j-user] SAXResult with XMLFilter chain knut paulsen
- Re: [dom4j-user] SAXResult with XMLFilter chain James Strachan
- Re: [dom4j-user] SAXResult with XMLFilter chain James Strachan
