I'm slightly overwhelmed by how many ways there are of processing XML in .NET.. In my case, I'm porting a ton of C lines over and I would like to wrap my code and keep it basically the way I had it (but use classes of course). I'm not exactly looking for THE fastest way, but more or less something consistent with the API I had before.
My specific API is like this: (This is C code)
XML* xml = XML_Load("file.xml");
XML_OBJECT* obj;
XML_FindObjectByTagName(xml->pstFirstObject, "objectname", &obj);
/* Go through objects at that level */
for (obj = obj; obj != null; obj = obj->pstNext)
{
char* s = XML_ReadAttribute_String(obj, "attribname");
/* This is how I use my current API, and I would like to sorta keep it similar */
}
So, I'm not sure if I can use one of the .NET classes and keep it similar looking, or if I should make a wrapper. If anyone knows a good solution for me, please let me know. I would really like to find the functions that let me find objects from their name, then be able to do a sorta (foreach) for the result. Thanks!