A Document is the unit of storage within a Container.
A Document contains a stream of bytes that may be of type XML or BYTES. The Container only indexes the content of Documents that contain XML. The BYTES type is supported to allow the storage of arbitrary content along with XML content.
Document supports annotation attributes.
allocateAllocate a new object
self[attr]Return the value of an attribute
self[attr] = valSet the value of an attribute
contentReturn the content of the document
content=(val)Set the content of the document
encodingReturn the encoding
get(uri = "", attr)Return the value of an attribute. uri specify the namespace where reside the attribute.
idReturn the ID
initialize(type = BDB::XML::XML)
initialize(content = "")Initialize the document with the type (or the content) specified
nameReturn the name of the document
name=(val)Set the name of the document
prefixReturn the default prefix for the namespace
prefix=(val)Set the default prefix used by set
set(uri = "", prefix = "", attr, value)Set an attribute in the namespace uri. prefix is the prefix for the namespace
to_s
to_strReturn the document as a String object
uriReturn the default namespace
uri=(val)Set the default namespace used by set and get