cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boisvert, Éric" <>
Subject RE: SAX parser problem [SOLVED]
Date Fri, 02 Dec 2005 16:22:54 GMT
I managed to solve the problem, it was rather simple -- but the process to
get to this answer is not linear.  Ard's suggestion actually gave me
pointers to another route for the solution.  I actually inspected the Stream
generator to see how it worked (this is the Cocoon equivalent to formal
documentation right ?) and found this solution, that works perfectly

WfsResponse is the HttpURLConnection output stream. 

	Reader xmlReader = new InputStreamReader(WfsResponse);
	InputSource i = new InputSource(xmlReader);
	getLogger().debug("got the input source");
	SAXParser parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);
	parser.parse(i, super.xmlConsumer);

thanks for the pointer Ard.

-----Message d'origine-----
De : Ard Schrijvers []
Envoyé : 1 décembre, 2005 16:31
À :
Objet : RE: SAX parser problem

> 3) Since you are probably patching this xml block in xml you 
> already had, remember that you really have to take care in 
> your contentHandler the fact that you must cut off the 
> document element of the xml you fetched, otherwise you will 

By the way:
I mean the startDocument and endDocument of the fetched xml ofcourse :-) 

> end up havind multiple document elements -> xml not valid.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message