Re: Not handle the XML header in the sax parser
Hey there, well actually i dont recommend doing that but here is a way to do it. You simple write yourself a documenthandler transmitter or whatever you call it (i named it FragmentHandler in the Example):P -- public class FragmentHandler implements ContentHandler { ContentHandler parent = null; public FragmentHandler(ContentHandler parent) { this.parent = parent; } } -- you have to implement ALL memberfunction of the ContentHandler interface and send all the events to the parent like this. -- public void characters(char[] ch, int start, int length) throws SAXException { parent.characters( ch, start, length); } -- and in the last step you simply catch the startDocument and endDocument events and dont tell the parent BUT like i said i'd only use it for testing. You never know which complications you can get into with this =)) Greetings Heiko Am Don, 2003-02-06 um 11.00 schrieb Lionel Crine: I'm using the avalon component sax parser and I parse a string value. but it returns the header . I don't want it because the String value is inline in the document : here is what I have in my browser : ?xml version=1.0 encoding=UTF-8? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:ixia-query=http://www.ixiasoft.com/ixia/query/1.0; ixia-query:document ?xml version=1.0 encoding=UTF-8? coucou/ /ixia-query:document /xsp:page How do I not handle the header during the parsing ? - 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Not handle the XML header in the sax parser
Well, that´s basically what the IncludeXMLConsumer (in package org.apache.cocoon.xml) does, doesn´t it? It additionally ignores the startDTD() and endDTD() methods. Regards, -Jan -Ursprüngliche Nachricht- Von: Heiko Milke [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 6. Februar 2003 17:34 An: [EMAIL PROTECTED] Betreff: Re: Not handle the XML header in the sax parser Hey there, well actually i dont recommend doing that but here is a way to do it. You simple write yourself a documenthandler transmitter or whatever you call it (i named it FragmentHandler in the Example):P -- public class FragmentHandler implements ContentHandler { ContentHandler parent = null; public FragmentHandler(ContentHandler parent) { this.parent = parent; } } -- you have to implement ALL memberfunction of the ContentHandler interface and send all the events to the parent like this. -- public void characters(char[] ch, int start, int length) throws SAXException { parent.characters( ch, start, length); } -- and in the last step you simply catch the startDocument and endDocument events and dont tell the parent snip - 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Not handle the XML header in the sax parser
Hey Jan Am Don, 2003-02-06 um 18.03 schrieb Jan Harms: Well, that´s basically what the IncludeXMLConsumer (in package org.apache.cocoon.xml) does, doesn´t it? It additionally ignores the startDTD() and endDTD() methods. Regards, -Jan didnt know :) Thanks for the hint ! Heiko - 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: Not handle the XML header in the sax parser
Heiko Milke wrote: Am Don, 2003-02-06 um 18.03 schrieb Jan Harms: Well, that´s basically what the IncludeXMLConsumer (in package org.apache.cocoon.xml) does, doesn´t it? It additionally ignores the startDTD() and endDTD() methods. Regards, -Jan didnt know :) Thanks for the hint ! Heiko Well, I also keep reinventing wheels, you know. ;-) Would be nice to have an alarm that goes off every time I implement functionality that already exists for free. *That* would really be a useful IDE feature... :-) :-) :-) Gruß aus Dortmund -Jan Harms - 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]