swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
    Other Library Functions  
function  

db.document-writer-sedna

 
 

Library: Database access (OMDB)
Import: omdb.xmd

Declaration

define string sink function db.document-writer-sedna
            of  value b.database database
          name  value string     document-name

or

  define string sink function db.document-writer-sedna
            of  value b.database database
          name  value string     document-name
    collection  value string     collection-name optional initial { "" }



Argument definitions

database
is a db.database object obtained by opening a connection to a database using one of the db.open functions.
document-name
is the name of the document to be stored in the database.
collection-name
is an optional string that is the name of the collection into which the document is to be stored within the database.


Purpose

Use db.document-writer-sedna to store an XML document into a Sedna database.

Usage Notes

Documents can also be stored in collections with a Sedna database.

The document name specified is the name it will have within the database.

This a string sink function and so the document to be stored is streamed into the function and through it into the Sedna database.

Example

The following program stores an XML document located in the file "auction1.xml".

    import "omdb.xmd" prefixed by db.
  
    process
       local db.database my-database
  
       set my-database to db.open-sedna "rhine" dbname "XMLDatabaseDemo" user
  "charley" password "chaplin"
  
       using output as db.document-writer-sedna of my-database name "auction1"
          output file "auction.xml"
       db.close my-database

      Other Library Functions
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.