ATF Using Dom Sample - kaisu1986/ATF GitHub Wiki
The sample application UsingDom is a simple demo of basic DOM use. It illustrates loading a schema with a schema loader, creating a game using DomNodes then saving the game data using the schema loader. It has no UI, running in a command prompt window.
To see how this sample is programmed, see Using Dom Programming Discussion.
- Deriving from XmlSchemaTypeLoader to customize a schema loader.
- Creating game data using either DomNodes or DomNodeAdapters.
- Saving application data with DomXmlWriter.
- Double-click the UsingDom.exe in ATF\Samples\UsingDom\bin\Release.
- A command prompt window appears briefly while the application is running.
There is no user interface. UsingDom automatically creates and saves the file game.xml XML file of game data.
Modules perform these functions:
- Program.cs: Contains the Main program. This loads the schema and creates and saves the game data.
- GameSchemaLoader.cs: Derive from XmlSchemaTypeLoader to customize a schema loader.
- Various files in the Schemas folder: Game object accessors.