XML Example


A while ago I wanted to create some objects from classes but it seemed like a lot of coding to add in some pre-defined objects which would always be the same. I found it a bit odd and couldn’t really see how it would be done in a large scale game; I knew the larger the project, the more the pre-defined objects. So whilst searching around, I read up on reading and writing to an XML form – whilst it wasn’t used in the program I still wrote a small example in C#. 


 Not too long ago, I wanted to refresh myself on how to use it properly; so instead of writing in C#, I decided to try using Java, which I had only briefly used. Both programs hold a series of contacts which can be loaded in from the same XML file; once loaded, the list is then printed out in a console. The C# example does have a bit more user input from the console, but as I only wanted to refresh myself on XML, I didn’t include these in the Java example.



Comments

Popular posts from this blog

3D Game Engine Using DirectX11 (C++)

MIPS Graphics Library

3D Renderer (C++)