You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by vishal1981 <vi...@ericsson.com> on 2012/09/05 04:51:49 UTC

Why doesnt the validation component use Stream Source internally to parse the XML?

Hi,
Excuse me for my lack of good understanding of the difference between
SAXSource and StreamSource. I am trying to replace some validation code by
the validator component provided by Camel. The existing code uses
StreamSource to parse the XML. From what I can guess StreamSource would
probably handle large XML files better than SAXSource. Why does Camel also
not use Stream Source in the
org.apache.camel.processor.validation.ValidatingProcessor class when it
calls the validator.validate method?
On some googling I found some old Apache Camel code of the
ValidatorComponent which used StreamSource.
Is SAXSource performance same as StreamSource? 

Thanks in advance,
-v-



--
View this message in context: http://camel.465427.n5.nabble.com/Why-doesnt-the-validation-component-use-Stream-Source-internally-to-parse-the-XML-tp5718632.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Why doesnt the validation component use Stream Source internally to parse the XML?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yes I think this component can be optimized as well. I have logged a ticket
https://issues.apache.org/jira/browse/CAMEL-5606

On Wed, Sep 5, 2012 at 4:51 AM, vishal1981
<vi...@ericsson.com> wrote:
> Hi,
> Excuse me for my lack of good understanding of the difference between
> SAXSource and StreamSource. I am trying to replace some validation code by
> the validator component provided by Camel. The existing code uses
> StreamSource to parse the XML. From what I can guess StreamSource would
> probably handle large XML files better than SAXSource. Why does Camel also
> not use Stream Source in the
> org.apache.camel.processor.validation.ValidatingProcessor class when it
> calls the validator.validate method?
> On some googling I found some old Apache Camel code of the
> ValidatorComponent which used StreamSource.
> Is SAXSource performance same as StreamSource?
>
> Thanks in advance,
> -v-
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Why-doesnt-the-validation-component-use-Stream-Source-internally-to-parse-the-XML-tp5718632.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen