XmlDocument

API Ref

#include <DbXml.hpp>

class DbXml::XmlDocument { public: XmlDocument(); XmlDocument(const XmlDocument &); ~XmlDocument(); XmlDocument &operator = (const XmlDocument &) ... };


Description: XmlDocument

An XmlDocument is the unit of storage within an XmlContainer. A document consists of content, a name, an ID, and a set of metadata attributes.

The document content is a byte stream. It must be well formed XML, but need not be valid.

The document name is a user-provided identifier for the document. The user can retrieve the document by name through the container query interface. The document name can be referenced in an XPath expression as "dbxml:name". For example, the XPath expression:

/*[@dbxml:name='abc123']

would retrieve the document with the name "abc123".

The Berkeley DB XML system assigns each document a unique ID when it is inserted into a container. The document ID uniquely identifies the document within a container, and can be used to retrieve the document from its container.

The metadata attributes provide a means of associating information with a document, without having to store it within the document itself. Example metadata attributes might be: document owner, creation time, receipt time, originating source, final destination, and next processing phase. They are analogous to the attributes of a file in a file system. Each metadata attribute consists of a name-value pair.

The copy constructor and assignment operator are provided for this class. The class is implemented using a handle-body idiom. When a handle is copied both handles maintain a reference to the same body.


Class

XmlContainer, XmlDocument, XmlException, XmlIndexSpecification, XmlQueryContext, XmlQueryExpression, XmlResults, XmlUpdateContext, XmlValue

APIRef

Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.