Importing individual XML files from a folder

Purpose

To import a folder containing a variety of XML files, which are then displayed as conceptual graphs within a knowledge model.

Theory

You can connect a single XML file or a folder of XML files to a knowledge model. You can also connect an XML data source that contains multiple records.

In this exercise, you will connect a folder of XML files to a knowledge model and then view the result of the XML inputs. The folder that you are connecting in this exercise contains the following XML files:

XML File Description
Book Defines the structure of a book including title, index and chapters.
Chemicals Describes the atomic structure of specific chemicals.
Format Defines the formatting of a document.
Java A serialised Java frame.
Narrative An example of "narrative" XML, where XML tags are used to highlight elements in a block of text.
SVG Defines the XML image format for the following image:
XHTML Describes a collection of web pages.

This exercise demonstrates that the Erudine Behaviour Engine can manage a variety of standard XML files.

Actions

To connect an XML data source to a knowledge model:

  1. Click the New Model button, to display a blank knowledge model screen.
  2. Right click a blank space on the screen and select Directory > XML Directory from the context menu.
  3. Type Input in the Create XML Directory box and click OK .
    A new node called Input is created.
  4. Right click on the Input node and select Properties from the context menu.
  5. Click the Minimise Down button in the top left corner of the knowledge model, to minimise it.
  6. Find the com.erudine.inbox.directoryPath property.
  7. Click once in the right hand column of the com.erudine.inbox.directoryPath property.

    The row for that property now displays an ellipsis (...) to the right of the column.
  8. Click on the ellipsis ( ... ) to display the Select a directory dialog box.
  9. Navigate to the Training\Introduction\XML1 folder in the Erudine root directory and click the Select button.
  10. In the Properties screen, click the Apply button to save the changes and return to the Knowledge Model screen.
    Seven cases now appear in the Input node.
  11. Double click on the Input node to display the Conclusion & Justification screen.
  12. Click the Minimise Down button in the top left corner of the knowledge model, to minimise it.
    The Situation List contains seven rows; one for each of the XML files within the XML1 folder.
    The situation for Id 0 represents the structure of a book.
  13. Select situations 1 to 6 in turn, to display the conceptual graphs for each XML file.
    The data from the seven XML files has been successfully imported into the knowledge model.
  14. Close the knowledge model without saving changes.

Platform: all
EBE Version: 2.4
Category: Introduction Guide
Author: Patrick Peisker


Browse Space

- Pages
- News
- Labels
- Attachments
- Bookmarks
- Mail
- Activity
- Advanced

Explore Confluence

- Popular Labels
- Notation Guide

Your Account

Log In

 

Other Features

Add Content