Re: XmlValidatingReader memory behaviour
- From: "Priya Lakshminarayanan [MSFT]" <priyal@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 1 Apr 2005 10:47:27 -0800
You can add all your schemas to an XmlSchemaCollection and then re-use this
schema collection with multiple XmlValidatingReaders that are created over
your multiple XML documents. This will ensure that the schemas are compiled
only once.
Thanks,
Priya
"Paul Hatcher" <phatcher@xxxxxxxxxxxxxxxxxx> wrote in message
news:%23cnymSuNFHA.1040@xxxxxxxxxxxxxxxxxxxxxxx
> I need to validate a number of different XML documents against the same
> schema, but the behaviour of XmlValidatingReader seems to make this very
> expensive in memory terms.
>
> We loaded about 150 XML files via XmlDocument.Load, which took around
about
> 3Mb of allocations, but the XmlValidatingReader added another 69Mb of
> allocations during Schema.Add
>
> What would be nice is if you could create a validating reader and assign
the
> schema and then have it process multiple XML documents; currently the
reader
> has to be passed in via the constructor so you can't re-use the internal
> schema set up that's expensive in memory terms.
>
> Paul
>
>
.
- Follow-Ups:
- Re: XmlValidatingReader memory behaviour
- From: Paul Hatcher
- Re: XmlValidatingReader memory behaviour
- References:
- XmlValidatingReader memory behaviour
- From: Paul Hatcher
- XmlValidatingReader memory behaviour
- Prev by Date: Re: xsd:extension not inherit attributes?
- Next by Date: Re: xsd:extension not inherit attributes?
- Previous by thread: XmlValidatingReader memory behaviour
- Next by thread: Re: XmlValidatingReader memory behaviour
- Index(es):
Relevant Pages
|