Re: XmlValidatingReader memory behaviour



Priya

Thanks a lot for that - saved me a lot of hassle

Regards

Paul

"Priya Lakshminarayanan [MSFT]" <priyal@xxxxxxxxxxxxxxxxxxxx> wrote in
message news:424d97ef$1@xxxxxxxxxxxxxxxxxxxxx
> 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
>>
>>
>
>


.



Relevant Pages

  • Re: XML Schema: inheritance with variable order of childs
    ... And the human editors of the xml files are ... If your editors are techies, ... XML documents, and try to design a 'loose' schema for their ... I mean using a more powerful schema definition language. ...
    (comp.text.xml)
  • XmlValidatingReader memory behaviour
    ... I need to validate a number of different XML documents against the same ... but the behaviour of XmlValidatingReader seems to make this very ... schema and then have it process multiple XML documents; ... schema set up that's expensive in memory terms. ...
    (microsoft.public.dotnet.xml)
  • Re: Bulk Load schema problems
    ... race and a relationship between race and pilot_results ... "Luciano Pagliarini" wrote in ... >> using xml bulk load and defining xsd schema. ... >> for 500 xml documents about 50kb each one, ...
    (microsoft.public.sqlserver.xml)
  • Re: XmlValidatingReader memory behaviour
    ... schema collection with multiple XmlValidatingReaders that are created over ... > I need to validate a number of different XML documents against the same ... but the behaviour of XmlValidatingReader seems to make this very ... > schema and then have it process multiple XML documents; ...
    (microsoft.public.dotnet.xml)
  • Re: Everything in XSD could be located by XPATH?
    ... Schemas are themselves XML documents, so you can process them with XML tools -- so, yes, you can run XPaths against those documents. ... The obvious alternative is to find a parser that returns a structured data model for the schema, ...
    (comp.text.xml)