.net - Does xdocument load the whole xml document? -


I am developing a webpage where I want to paste the pars and XML into the string. I am doing this through the XDocument.Load method. XDocument = XDocument.Load (New String Reader (strXML)) as a slow document

Where StrxML is xml Snippet

What do I know - loads the entire snippet in load memory? If this is the case ... then my program will be slow if 200-300 users are logged in at the same time.

Using XDocument.parse would be a better choice? I am not too keen to use XMLReader for I is different from XDocument.Load

.

this is very similar, but pars will not require you to do anything special with XML string . Net Framework will do this for you:

  Public Stable XDocument Pars (String Text, Loadopts Option) {(StringReader StringRedder = New StringReader (Text)) {XmlReaderSettings xmlReaderSettings = XNode.GetXmlReaderSettings (the option); (XmlReader Reader = XmlReader.Create Returns XDocument.Load (Reader, Options) using string reader, xmlReaderSettings;}}  

The decompiled source of the above parse method


Comments