I am trying to write a xml parser for my game, since the size of the final build increase by 1+ mb when using the system.xml namespace. The parser class is a singleton and will be ready for access anytime in the game. Though the amount of data I am going to handle is not much, I am still worried about the performance (since it is a game, I cannot afford to sacrifice any performance).
Is there any way to effectively handle the parsing. Btw i am using c# and if a tag named <tag> is there, I am just breaking down the string into pieces searching for <tag> and </tag>. This will continue recursively until the whole string is broken down completely. And the result will be saved in a jagged list class I have created.
Are there any ways, I can improve my method or should I just go with System.XML name space.
Also another note: The xml data is from server not from a local file.
Some notes (this should be a comment, but is too long):
System.Xml, created anXmlDocument, used it, and compiled, and didn’t see any meaningful increase in size.System.Xmlis part of the .Net base class library. Generally, you can count on it being on every machine that runs .Net (according the msdn, XmlDocument is available in XNA, for example, but not on the portable class library).XDocument, but it also requiresSystem.Xml.dll, so no gain there)