Exercise 5: Quick-start guide for configuring the XML Builder

Complexity: Beginner Data Requirement: ArcGIS Tutorial Data for Desktop Data Path: C:\ArcGIS\ArcTutor\Schematics\Schematics_Configuration\XML_Data Goal: Configuring a schematic diagram template based on the XML Builder to generate diagrams from XML file samples

Schematic diagrams can be generated from .xml files or .xml streams that follow the XML Schema definition for a Schematic Diagram. This XML Schema, XMLBuilderDiagram.xsd, can be found in the Schematics\XMLSchema folder in your ArcGIS installation directory. The XML Builder is very useful for system integration situations where abstraction is needed between two systems or the data is not in a standard format and requires processing logic to retrieve. The data is passed to Schematics following the XML Schema definition, and Schematics is then responsible for storage and display of the diagram. During this exercise, you are going to learn how to create and configure a schematic diagram template to generate diagrams from an XML file that is stored on the local machine. The configuration is going to be done using the SchematicBuilder Samples schematic dataset created during exercise 1.

Steps:
  1. Edit the SchematicBuilderSamples schematic dataset stored in the C:\ArcGIS\ArcTutor\Schematics\TutorialSchematicDB geodatabase by browsing to this database using ArcCatalog, then right-clicking the dataset and choosing the Edit menu option Edit schematic dataset button.
    NoteNote:

    The screen captures in this exercise show configuration parameters created during the previous exercises. Those exercises are not a prerequisite for this exercise. You can follow the steps explained in this exercise without completing the previous exercises.

Creating a schematic diagram template based on the XML Builder

The first phase consists of creating the schematic diagram template that will be used to generate diagrams from XML files stored on the local machine.

Steps:
  1. Right-click the SchematicBuilderSamples entry in the Dataset Editor tree and click the New Schematic Diagram Template menu item.

    A Properties tab for the new schematic diagram template automatically displays on the right side of the Editor window.

    New Schematic Diagram Template—Properties tab initial content

  2. Type DiagramsFromXMLData in the Name text box.
  3. Choose XML Builder in the Schematic Builder section.
  4. Click OK.

    An entry for the DiagramsFromXMLData diagram template displays in the Dataset Editor tree. Three new tabs (Associations, Layouts, and Rules) display on the right side of the Schematic Dataset Editor window.

    DiagramsFromXMLData diagram template created

  5. Click the Schematic Builder Properties button Schematic Builder Properties button on the Properties tab to open the Builder Properties dialog box for the XML Builder.
    1. Check the Automatic schematic feature class creation check box.

      This tells the system to automatically create all the configuration items necessary to display the data that will be found in the XML files.

      DiagramsFromXMLData—Builder Properties

    2. Click OK on the Builder Properties dialog box.
  6. Click Save Save on the Schematic Dataset Editor toolbar.
  7. Close the Schematic Dataset Editor.

Generating a schematic diagram from an XML file

In this section, you are going to generate your first schematic diagram based on the newly created DiagramsFromXMLData diagram template.

Steps:
  1. Start ArcMap with a blank map document.
  2. Click the Generate New Schematic Diagram button Generate New Schematic Diagram on the Schematic toolbar to open the New Schematic Diagram dialog box.
  3. Click the browse button on the right side of the Schematic Dataset or Folder field to open the Select schematic dataset or schematic folder dialog box.
    1. Browse to and select the TutorialSchematicDB geodatabase that was created in C:\ArcGIS\ArcTutor\Schematics during exercise 1.
    2. Double-click this geodatabase and select the SchematicBuilderSamples schematic dataset.
      Diagram generation—Select schematic dataset
    3. Click the Add button.
  4. Choose DiagramsFromXMLData in the Schematic Diagram Template drop-down list.
  5. You need to point to an XML file that has data. Click the ellipsis button in the Specify the input XML file section to open the Select XML file dialog box.
    1. Browse to and select the SampleNetworkData.xml file located in the C:\ArcGIS\ArcTutor\Schematics\Schematics_Configuration\XML_Data folder.
    2. Click the Add button.
  6. Type FirstDiagram_FromXML in the Schematic Diagram Name field.

    The New Schematic Diagram dialog box displays as follows:

    New Schematic Diagram dialog box—Final content for the XML Builder sample diagram

  7. Click OK.

    The generation process starts, and the generated diagram displays in a new data frame, which is automatically added to the map document:

    First generated diagram from an XML sample data file

2/10/2012