DataSourceXml class

Package: com.tecit.TFORMer.Repository

Specialized DataSource for XML data.

Usage and notes

Overview

DataSourceXml is a specialized DataSource for importing data from XML-Files.
This class is used to manipulate existing DataSourceXml objects. To create a new DataSource use TFORMer Designer or Project.addDataSource.

The main properties to characterize a DataSourceXml are:

  • The XML filename

  • An optional XSLT file for transforming the XML file into a suitable TFORMer compatible format

Modifying an Existing XML DataSource

Sample source code for modifying an existing DataSourceXml:

  // Retrieve the global Project
  // DataSources are defined in a Project or a global Project
  Project project = repository.getGlobalProject ();

  // Retrieve the DataSource by name
  // Since we know the type of the DataSource, we can cast it to DataSourceXml
  DataSourceXml dataSource = (DataSourceXml)project.getDataSource("XML");

  // Modify some DataSource properties
  dataSource.setXsltFilename(""); // clear XSLT filename  

Base types: DataSource

Inherited members (33)

Methods

MemberDescription
dump(PrintStream)Returns: void

Dumps the current instance into a text stream.

getFilename()Returns: String

Gets the filename of the XML-file.

getXsltFilename()Returns: String

Gets the filename of the XSLT file for transforming the XML file.

setFilename(String)Returns: void

Sets the filename of the XML-file.

setXsltFilename(String)Returns: void

Gets the filename of the XSLT file for transforming the XML file.

Search documentation

Search in
More scopes
Additional scopes

All contents