No, it does not parse XML over and over; once when you call
XDocument.Parse(e.Result);
After that, the calls refer to the tree structure of the xml object.
“Analysis” means analyzing an unstructured text string (for example, from a file) and creating data structures (such as a tree). Your calls ... .Element("foo") not processed, but refer to parts of the data structure that were created by calling XDocument.Parse() .
If you are wondering if your code will repeat some steps redundantly and can be optimized, then yes, you are moving ipb/profile excessively. This is not parsing, but Element ("foo") calls should do some work comparing string arguments with child element names. @ However, the proposal corrects this for reasons of readability, but also helps in efficiency.
Larsh
source share