Topic: parsing complex objects using Java SAX Developer background: newbe I have data stream that contains complex objects (call this CO1). The object contains sub-structures (call this SS1) that are used by other complex objects (CO2). Furthermore the sub-structures themselves may at times be standalone objects.
I would like to write a content handler that can process the sub-structures when they are standalone. I would like to reuse the sub-structures content handler when processing to more complex object from its content handler. The examples I have seen chain the XMLReaders content handler for CO1 to use the content handler for SS1 at the startElement() method. So far so good! But the ugly stuff occurs in the content handler for the sub-structure SS1. The SS1 content handler endElement() method needs to know its parent wrapper ends. At that point the XMLReader content handler is returned to the parent object. Is there an example of another solution? By NO means am I trying to discredit the author of the article. He has presented the only solution I have seen after a day of searching. I am thankful for his work but I am wondering if there is a different solution to the problem. Referenced article: http://www.javaworld.com/javaworld/jw-08-2000/jw-0804-sax-p5.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]