I have a huge XML(1000 lines) and I have 2 ways to parse through it and get the job done!. My job here is to extract some elements out of the XML and log it in the database. So, out of the following options, is which is better when deployed to Production and in terms of performance.
OPTION 1:
- Deserialise the XML using XMLDocument
- store only the node name in the database - to select which node to be retrieved.
OPTION 2:
- Deserialize the XML into a class object.
- Store the whole path of the XML node(including all the parent nodes) in the database.
- Use reflections to extract elements out of a class.
We are using C# as the language. Appreciate any response!. Thank You.
Aucun commentaire:
Enregistrer un commentaire