cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Sösemann <robert.soesem...@gmx.de>
Subject generate correct SAX in custom generator
Date Fri, 10 Jan 2003 12:22:36 GMT
Dear listmembers,

I read about problem reading in XML fragment from db Clobs in cutom
generators in the mailing list.
I also read about using this InputXMLConsumer.
But I never found an example that I could modify form my problem. I found
none.

Maybe someone could just send me a snippet of java code that extraxt an xml
fragment from a db clob and does all the parsing and SAX stuff.

That what I do in the moment:
------------------------------
                startSimpleElement("ABSTRACT", attr);

                            addXML(item.getText()); <<---------------

              endSimpleElement("ABSTRACT");

     endSimpleElement("ROOT");

--


    protected void addXML(Reader xmlFragment) throws SAXException,
IOException{
 try {
     org.apache.avalon.excalibur.xml.Parser parser = new
org.apache.avalon.excalibur.xml.JaxpParser();
              InputSource is = new InputSource(xmlFragment);
     parser.parse(is, new IncludeXMLConsumer(super.xmlConsumer));
 } catch (Exception e) {
 }
    }

It produces a string which looks like XML but can not be handled by my xsls.

Any idea?

Rob


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message