Skip to content

ATF Using Dom Sample

Gary edited this page Mar 17, 2015 · 3 revisions

Table of Contents

Description

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.

ATF Features Demonstrated by UsingDom

  • Deriving from XmlSchemaTypeLoader to customize a schema loader.
  • Creating game data using either DomNodes or DomNodeAdapters.
  • Saving application data with DomXmlWriter.

Run UsingDom

  1. Double-click the UsingDom.exe in \bin\wws_atf\Release.
  2. A command prompt window appears briefly while the application is running.

How to Use UsingDom

There is no user interface. UsingDom automatically creates and saves the file game.xml XML file of game data.

UsingDom Modules

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.

Topics in this section

Clone this wiki locally