All data processing is done via two classes:
TaminoCommand
and
TaminoSchemaCommand
. The
TaminoCommand
class is used to process Tamino documents,
whereas the TaminoSchemaCommand
class provides methods
for manipulating Tamino document type information.
Each command object is always associated with a specific connection
object. The TaminoConnection
class provides methods for
creating TaminoCommand
and
TaminoSchemaCommand
objects. It is not essential for the
connection to be open when creating commands, although as good programming
practice we recommend opening the
connection.
Use the CreateCommand
method in the
TaminoConnection
class to create a
TaminoCommand
object. The method takes the Tamino
collection name as a parameter. All commands of a specific
TaminoCommand
object are executed relative to this
Tamino collection. The only exception to this rule is if the application works
with URIs (see chapter Working with
URIs).
... TaminoCommand command1 = connection.CreateCommand("mycollection"); connection.Open(TaminoConnectionMode.AutoCommit); ... TaminoCommand command2 = connection.CreateCommand("mycollection2"); ...
Use the CreateSchemaCommand
method in the
TaminoConnection
class to create a
TaminoSchemaCommand
object. In contrast to
TaminoCommand
objects, a
TaminoSchemaCommand
object is not associated with a
specific Tamino collection.