xflminterface IF_DOMNode : public XF_RefCount
This class represents the DOM Node. It extends XF_RefCount. The DOM Node is a foundational component in a database. All XML documents are represented as a series of DOM nodes. To manipulate a document, all that is needed is a reference to it's root DOM node. From there, all other parts of the document can be obtained.
Method Summary |
|
RCODE |
createNode - Create a new node relative to the current node. |
RCODE |
createChildElement - Create a new element node that is a child of the current node. |
RCODE |
deleteNode - Delete node and all descendant nodes. |
RCODE |
deleteChildren - Delete child nodes. |
RCODE |
createAttribute - Create an attribute node. Must only be called on element nodes. |
RCODE |
getFirstAttribute - Retrieve first attribute node. Must only be called on element nodes. |
RCODE |
getLastAttribute - Retrieve last attribute node. Must only be called on element nodes. |
RCODE |
getAttribute - Retrieve an attribute node with the specified attribute name id. Must only be called on element nodes. |
RCODE |
deleteAttribute - Delete an attribute node with the specified attribute name id. Must only be called on element nodes. |
RCODE |
hasAttribute - Determine if the node has a specific attribute. Must only be called on element nodes. |
RCODE |
hasAttributes - Determine if the node has any attributes. Must only be called on element nodes. |
RCODE |
hasNextSibling - Determine if the node has a next sibling. |
RCODE |
hasPreviousSibling - Determine if the node has a previous sibling. |
RCODE |
hasChildren - Determine if node has any child nodes. |
RCODE |
isNamespaceDecl - Determine if the node is a namespace declaration. Must only be called on attribute nodes. |
eDomNodeType
|
getNodeType - Retrieve node's type (element, attribute, etc.). |
RCODE |
getNodeId - Get the node id for the node. NOTE: Must not be called on attribute nodes, as they do not have a node id. |
RCODE |
getParentId - Get the node's parent id. |
RCODE |
getDocumentId - Get the node's document id. |
RCODE |
getPrevSibId - Get the node's previous sibling id. NOTE: Must not be called on attribute nodes, as they do not have a previous sibling id. |
RCODE |
getNextSibId - Get the node's next sibling id. NOTE: Must not be called on attribute nodes, as they do not have a next sibling id. |
RCODE |
getFirstChildId - Get the node's first child id. NOTE: Must not be called on attribute nodes, as they do not have a first child id. |
RCODE |
getLastChildId - Get the node's last child id. NOTE: Must not be called on attribute nodes, as they do not have a last child id. |
RCODE |
getNameId - Get the node's name id. Zero is returned if the node does not have a name id. |
RCODE |
getEncDefId - Get the node's encryption definition id. Zero is returned if the node is not encrypted. |
RCODE |
getDataType - Get the data type of the node. |
RCODE |
getDataLength - Get the size of the node's value. |
RCODE |
getUINT32 - Get the value of the node as a 32 bit unsigned integer. |
RCODE |
getUINT - Get the value of the node as an unsigned integer. |
RCODE |
getUINT64 - Get the value of the node as a 64 bit unsigned integer. |
RCODE |
getINT32 - Get the value of the node as a 32 bit signed integer. |
RCODE |
getINT - Get the value of the node as a signed integer. |
RCODE |
getINT64 - Get the value of the node as a 64 bit signed integer. |
RCODE |
getMetaValue - Get the metavalue of the node as a 64 bit unsigned integer. |
RCODE |
getUnicodeChars - Get the number of unicode characters in the node. |
RCODE |
getUnicode(1) - Get the node value as a unicode string - application supplies a buffer for the string. |
RCODE |
getUnicode(2) - Get the node value as a unicode string - allocate memory for the string. |
RCODE |
getUnicode(3) - Get the node value as a unicode string - application supplies IF_DynaBuf for the value. |
RCODE |
getUTF8(1) - Get the node value as a UTF8 string - application supplies a buffer for the string. |
RCODE |
getUTF8(2) - Get the node value as a UTF8 string - allocate memory for the string. |
RCODE |
getUTF8(3) - Get the node value as a UTF8 string - application supplies IF_DynaBuf for the value. |
RCODE |
getBinary(1) - Get the value of the node as binary data - application supplies buffer for the data |
RCODE |
getBinary(2) - Get the value of the node as binary data - application supplies IF_DynaBuf for the value. |
RCODE |
getAttributeValueUINT32(1) - A method to retrieve the value of an element attribute as a 32 bit unsigned integer. |
RCODE |
getAttributeValueUINT32(2) - A method to retrieve the value of an element attribute as a 32 bit unsigned integer. |
RCODE |
getAttributeValueUINT(1) - A method to retrieve the value of an element attribute as an unsigned integer. |
RCODE |
getAttributeValueUINT(2) - A method to retrieve the value of an element attribute as an unsigned integer. |
RCODE |
getAttributeValueUINT64(1) - A method to retrieve the value of an element attribute as a 64 bit unsigned integer. |
RCODE |
getAttributeValueUINT64(2) - A method to retrieve the value of an element attribute as a 64 bit unsigned integer. |
RCODE |
getAttributeValueINT(1) - A method to retrieve the value of an element attribute as a signed integer. |
RCODE |
getAttributeValueINT(2) - A method to retrieve the value of an element attribute as a signed integer. |
RCODE |
getAttributeValueINT64(1) - A method to retrieve the value of an element attribute as a 64 bit signed integer. |
RCODE |
getAttributeValueINT64(2) - A method to retrieve the value of an element attribute as a 64 bit signed integer. |
RCODE |
getAttributeValueUnicode(1) - A method to retrieve the value of an element attribute as a unicode string - application supplies buffer for the string. |
RCODE |
getAttributeValueUnicode(2) - A method to retrieve the value of an element attribute as a unicode string - allocate memory for the string. |
RCODE |
getAttributeValueUnicode(3) - A method to retrieve the value of an element attribute as a unicode string - application supplies IF_DynaBuf for the string. |
RCODE |
getAttributeValueUTF8(1) - A method to retrieve the value of an element attribute as a UTF8 string - application supplies buffer for the string. |
RCODE |
getAttributeValueUTF8(2) - A method to retrieve the value of an element attribute as a UTF8 string - allocate memory for the string. |
RCODE |
getAttributeValueUTF8(3) - A method to retrieve the value of an element attribute as a UTF8 string - application supplies IF_DynaBuf for the string. |
RCODE |
getAttributeValueBinary(1) - A method to retrieve the value of an element attribute as binary data - application supplies buffer for the value. |
RCODE |
getAttributeValueBinary(2) - A method to retrieve the value of an element attribute as binary data - application supplies IF_DynaBuf for the value. |
RCODE |
setUINT - Set the value of the node to an unsigned integer. |
RCODE |
setUINT64 - Set the value of the node to a 64 bit unsigned integer. |
RCODE |
setINT - Set the value of the node to a signed integer. |
RCODE |
setINT64 - Set the value of the node to a 64 bit signed integer. |
RCODE |
setMetaValue - Set the metavalue of the node to a 64 bit unsigned integer. |
RCODE |
setUnicode - Set the value of the node to a unicode string. |
RCODE |
setUTF8 - Set the value of the node to a UTF8 string. |
RCODE |
setBinary - Set the value of the node to binary data. |
RCODE |
setAttributeValueUINT - A method to set the value of an element attribute to an unsigned integer. |
RCODE |
setAttributeValueUINT64 - A method to set the value of an element attribute to a 64 bit unsigned integer. |
RCODE |
setAttributeValueINT - A method to set the value of an element attribute to a signed integer. |
RCODE |
setAttributeValueINT64 - A method to set the value of an element attribute to a 64 bit signed integer. |
RCODE |
setAttributeValueUnicode - A method to set the value of an element attribute to a unicode string. |
RCODE |
setAttributeValueUTF8 - A method to set the value of an element attribute to a UTF8 string. |
RCODE |
setAttributeValueBinary - A method to set the value of an element attribute to a binary data buffer. |
RCODE |
getDocumentNode - Get the node's document node - the root node of the document that contains the node. |
RCODE |
getNextDocument - Get the document node for the document that is after the document containing the node. |
RCODE |
getPreviousDocument - Get the document node for the document that is previous to the document containing the node. |
RCODE |
getParentNode - Get the node's parent node. |
RCODE |
getFirstChild - Get the node's first child node. |
RCODE |
getLastChild - Get the node's last child node. |
RCODE |
getNextSibling - Get the node's next sibling node. |
RCODE |
getPreviousSibling - Get the node's previous sibling node. |
RCODE |
getChild - Get the first child of the node of a specified node type. |
RCODE |
getChildElement - Get the first child of the node whose type is ELEMENT_NODE and whose element name id matches the passed in name id. |
RCODE |
getSiblingElement - Get the next or previous sibling of the node whose type is ELEMENT_NODE and whose element name id matches the passed in name id. |
RCODE |
getAncestorElement - Get the node's ancestor element node. |
RCODE |
getDescendantElement - Get the node's descendant element node. |
RCODE |
insertBefore - Insert a new DOM node into a chain of child nodes. |
RCODE |
getPrefix(1) - Get the node's prefix as a unicode string. |
RCODE |
getPrefix(2) - Get the node's prefix as a native string. |
RCODE |
getPrefixId - Get the node's prefix Id. |
RCODE |
setPrefix(1) - Set the node's prefix from a unicode string. |
RCODE |
setPrefix(2) - Set the node's prefix from a native string. |
RCODE |
setPrefixId - Set the node's prefix Id. |
RCODE |
getNamespaceURI(1) - Get node's namespace URI as a unicode string. |
RCODE |
getNamespaceURI(2) - Get node's namespace URI as a native string. |
RCODE |
getLocalName(1) - Get node's local name as a unicode string. |
RCODE |
getLocalName(2) - Get node's local name as a native string. |
RCODE |
getQualifiedName(1) - Get node's qualified name as a unicode string.. |
RCODE |
getQualifiedName(2) - Get node's qualified name as a native string. |
RCODE |
getCollection - Get the collection where the DOM node resides. |
RCODE |
createAnnotation - Create an annotation for the node. |
RCODE |
getAnnotation - Get the node's annotation node, if any. |
RCODE |
getAnnotationId - Get the node's annotation node, if any. |
RCODE |
hasAnnotation - Determine if the node has an annotation. |
RCODE |
getIStream - Get an input stream object that can be used to stream large binary values out of the node. |
RCODE |
getTextIStream - Get an input stream object that can be used to stream large string values out of the node. |
FLMUINT |
compareNode - A method to compare two DOM nodes. |
FLMBOOL |
isDataLocalToNode - Determine's if a node's data is cached with the node object, or if we have to go to disk to get it. |
Method Detail |
RCODE createNode(
IF_Db * pDb,
eDomNodeType eNodeType,
FLMUINT uiNameId,
eNodeInsertLoc eLocation,
IF_DOMNode ** ppNewNode,
FLMUINT64 * pui64NodeId = NULL);
Creates a new node relative to the current node.
Parameters In:
IF_Db * pDb Pointer to the database object. Database object must have an update transaction going. eDomNodeType eNodeType The type of the node that will be created. Depending on the parent node, some node types may not be created as a child node. For example, a data node may not have any child or attribute nodes, and an attribute node may not have any attribute or child nodes. FLMUINT uiNameId The name id of the node to be created. eNodeInsertLoc eLocation Defines the position where the new node is to be inserted into the document tree, relative to the current node. The only locations allowed are: XFLM_FIRST_CHILD, XFLM_LAST_CHILD, XFLM_PREV_SIB, and XFLM_NEXT_SIB. Not all of these work for all types of nodes.
Parameters Out:
IF_DOMNode ** ppNewNode A pointer to the new node. FLMUINT64 * pui64NodeId The node id for the newly created node. May be NULL.
Example Code:
IF_DOMNode * pMusicElement = NULL;
IF_DOMNode * pCdElement = NULL;
IF_DOMNode * pTitleAttribute = NULL;
FLMUINT uiMusicElementDef = 35;
FLMUINT uiCdElementDef = 36;
FLMUINT uiTitleAttributeDef = 1;
// Create a "music" root element
if ( RC_BAD( rc = pDb->createRootElement( uiCollectionDef, uiMusicElementDef, &pMusicElement)))
{
goto Exit;}
// Create the "cd" element as a first child of the "music" element.
if ( RC_BAD( rc = pMusicElement->createNode( pDb, ELEMENT_NODE, uiCdElementDef, XFLM_FIRST_CHILD,
&pCdElement, NULL)))
{
goto Exit;
}
// Create a "title" attribute on the CD element
if (RC_BAD( rc = pCdElement->createAttribute( pDb, uiTitleAttributeDef , &pTitleAttribute, NULL)))
{
goto Exit;
}
See Also: deleteNode, createAttribute, IF_Db::createRootElement, IF_Db::createDocument, IF_Db::documentDone, deleteChildren, createAnnotation, insertBefore
RCODE createChildElement(
IF_Db * pDb,
FLMUINT uiChildElementNameId,
eNodeInsertLoc eLocation,
IF_DOMNode ** ppNewChildElementNode,
FLMUINT64 * pui64NodeId = NULL);
Creates a new element node as a child of the current node.
Parameters In:
IF_Db * pDb Pointer to the database object. Database object must have an update transaction going. FLMUINT uiChildElementNameId The element name id for the child element that is to be created. eNodeInsertLoc eLocation Defines the position where the new node is to be inserted into the document tree, relative to the current node. Only XFLM_FIRST_CHILD and XFLM_LAST_CHILD are allowed in this method.
Parameters Out:
IF_DOMNode ** ppNewChildElementNode A pointer to the newly created child element node. FLMUINT64 * pui64NodeId The node id for the newly created child element node. May be NULL.
Example Code:
IF_DOMNode * pMusicElement = NULL;
IF_DOMNode * pCdElement = NULL;
IF_DOMNode * pTitleAttribute = NULL;
FLMUINT uiMusicElementDef = 35;
FLMUINT uiCdElementDef = 36;
// Create a "music" root element
if ( RC_BAD( rc = pDb->createRootElement( uiCollectionDef, uiMusicElementDef, &pMusicElement)))
{
goto Exit;}
// Create the "cd" element as a first child of the "music" element.
if ( RC_BAD( rc = pMusicElement->createChildElement( pDb, uiCdElementDef, XFLM_FIRST_CHILD,
&pCdElement, NULL)))
{
goto Exit;
}
See Also: deleteNode, createAttribute, IF_Db::createRootElement, IF_Db::createDocument, IF_Db::documentDone, deleteChildren, createAnnotation, insertBefore
RCODE deleteNode(
IF_Db * pDb);
This method will delete the current DOM node, as well as all of it's descendants. Any indexes that reference this node (or it's descendants) will be updated.
Parameters In:
IF_Db * pDb Pointer to the database object. The database object must have an update transaction going.
Parameters Out: none.
Example Code:
IF_DOMNode * pFirstDoc = NULL;
// Get the first document in the default data collection and delete it.
if ( RC_BAD( rc = pDb->getFirstDocument( XFLM_DATA_COLLECTION, &pFirstDoc )))
{
goto Exit;
}
// Deleting the root node of the document will also delete all of its decendants// effectively deleting the entire document.
if (RC_BAD( rc = pFirstDoc ->deleteNode( pDb)))
{
goto Exit;
}
See Also: createNode, createChildElement, createAttribute, IF_Db::createRootElement, IF_Db::createDocument, deleteChildren, createAnnotation
RCODE deleteChildren(
IF_Db * pDb,
FLMUINT uiNameId = 0);
This method will delete child nodes. Any indexes that reference this node (or it's descendants) will be updated.
Parameters In:
IF_Db * pDb Pointer to the database object. The database object must have an update transaction going. FLMUINT uiNameId If non-zero, only delete child nodes (elements and data nodes) with this name id.
Parameters Out: none.
Example Code:
IF_DOMNode * pFirstDoc = NULL;
// Get the first document in the default data collection and delete everything in it except the root node itself
if ( RC_BAD( rc = pDb->getFirstDocument( XFLM_DATA_COLLECTION, &pFirstDoc )))
{
goto Exit;
}
if (RC_BAD( rc = pFirstDoc ->deleteChildren( pDb, 0)))
{
goto Exit;
}
See Also: createNode, createChildElement, createAttribute, IF_Db::createRootElement, IF_Db::createDocument, deleteNode
RCODE createAttribute(
IF_Db * pDb,
FLMUINT uiAttrNameId,
IF_DOMNode ** ppAttrNode,
FLMUINT64 * pui64NodeId = NULL);
Create an attribute node. This method should only be called on element nodes.
Parameters In:
IF_Db * pDb Pointer to the database object. The database object must have an update transaction going. FLMUINT uiAttrNameId Name id of the attribute to create. An attribute definition with this name id must exist in the dictionary before it can be used in this method. Or, it may be one of the pre-defined attribute name ids that are used to create attributes in dictionary definition documents.
Parameters Out:
IF_DOMNode ** ppAttrNode The new attribute node. FLMUINT64 * pui64NodeId The node id of the new attribute node. Optional.
Example Code: see createNode
See Also: createNode, createChildElement, deleteNode, getFirstAttribute, getLastAttribute, getAttribute, hasAttribute, hasAttributes, IF_Db::createRootElement, IF_Db::createDocument, IF_Db::documentDone, deleteChildren, deleteAttribute, createAnnotation
RCODE getFirstAttribute(
IF_Db * pDb,
IF_DOMNode ** ppAttrNode);
Retrieve the first attribute of the node. The node must be an element node.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
IF_DOMNode ** ppAttrNode A pointer to the first attribute node is returned. Note that if *ppAttrNode is currently pointing to another node, it will be released before returning the first attribute node.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have retrieved a node (pNode) using the database object (pDb). Move to its first attribute.
rc = pNode->getFirstAttribute( pDb, &pNode);
See Also: createAttribute, getLastAttribute, getAttribute, hasAttribute, hasAttributes, deleteAttribute
RCODE getLastAttribute(
IF_Db * pDb,
IF_DOMNode ** ppAttrNode);
Retrieve the last attribute of the node. This method should only be called on element nodes.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
IF_DOMNode ** ppAttrNode A pointer to the last attribute node is returned. Note that if *ppAttrNode is currently pointing to another node, it will be released before returning the last attribute node.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have retrieved a node (pNode) using the database object (pDb). Move to its last attribute.
rc = pNode->getLastAttribute( pDb, &pNode);
See Also: createAttribute, getFirstAttribute, getAttribute, hasAttribute, hasAttributes, deleteAttribute
RCODE getAttribute(
IF_Db * pDb,
FLMUINT uiAttrNameId,
IF_DOMNode ** ppAttrNode);
Retrieve an attribute node with the specified name id. This method should only be called on element nodes.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The name id of the attribute to be retrieved.
Parameters Out:
IF_DOMNode ** ppAttrNode The attribute node.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have retrieved a node (pNode) using the database object (pDb). Move to its attribute whose name id is 37.
rc = pNode->getAttribute( pDb, 37, &pNode);
See Also: createAttribute, getFirstAttribute, getLastAttribute, hasAttribute, hasAttributes, deleteAttribute
RCODE deleteAttribute(
IF_Db * pDb,
FLMUINT uiAttrNameId);
Delete an attribute node with the specified attribute name id. This is equivalent to calling the getAttribute method, followed by the deleteNode method. This method should only be called on element nodes.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The name id of the attribute to be deleted.
Parameters Out: none.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have retrieved a node (pNode) using the database object (pDb). Delete its attribute whose name id is 37.
rc = pNode->deleteAttribute( pDb, 37);
See Also: createAttribute, getFirstAttribute, getLastAttribute, hasAttribute, hasAttributes, getAttribute
RCODE hasAttribute(
IF_Db * pDb,
FLMUINT uiAttrNameId,
IF_DOMNode ** ppAttrNode = NULL);
Determine if the node has a particular attribute. This method should only be called on element nodes.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The name id of the particular attribute that this method will search for. This name id of the attribute definition in the dictionary.
Parameters Out:
IF_DOMNode ** ppAttrNode A pointer to the attribute node. Optional.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have retrieved a node (pNode) using the database object (pDb). See if it has an attribute whose name id is 37.
rc = pNode->hasAttribute( pDb, 37, NULL);
See Also: createAttribute, getFirstAttribute, getLastAttribute, getAttribute, hasAttributes, hasChildren
RCODE hasAttributes(
IF_Db * pDb,
FLMBOOL * pbHasAttrs);
Determine if the node has any attribute nodes. This method should only be called on element nodes.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMBOOL * pbHasAttrs A boolean flag that indicates whether or not the DOM Node has any attributes.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMBOOL bHasAttributes;
// Assume that we have retrieved a node (pNode) using the database object (pDb). See if it has any attributes.
rc = pNode->hasAttributes( pDb, &bHasAttributes);
See Also: createAttribute, getFirstAttribute, getLastAttribute, getAttribute, hasAttribute, hasChildren
RCODE hasNextSibling(
IF_Db * pDb,
FLMBOOL * pbHasNextSibling);
Determine if node has a next sibling.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMBOOL * pbHasNextSibling A boolean flag that indicates whether or not the node has a next sibling.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMBOOL bHasNextSibling;
// Assume that we have retrieved a node (pNode) using the database object (pDb). See if it has a next sibling.
rc = pNode->hasNextSibling( pDb, &bHasNextSibling);
See Also: hasPreviousSibling, hasChildren, createAttribute, getFirstAttribute, getLastAttribute, getAttribute, hasAttribute
RCODE hasPreviousSibling(
IF_Db * pDb,
FLMBOOL * pbHasPreviousSibling);
Determine if the node has a previous sibling.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMBOOL * pbHasPreviousSibling A boolean flag that indicates whether or not the node has a previous sibling.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMBOOL bHasPreviousSibling;
// Assume that we have retrieved a node (pNode) using the database object (pDb). See if it has a previous sibling.
rc = pNode->hasPreviousSibling( pDb, &bHasPreviousSibling);
See Also: hasNextSibling, hasChildren, createAttribute, getFirstAttribute, getLastAttribute, getAttribute, hasAttribute
RCODE hasChildren(
IF_Db * pDb,
FLMBOOL * pbHasChildren);
Determine if node has any child nodes.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMBOOL * pbHasChildren TRUE if the node has at least one child node, FALSE otherwise.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMBOOL bHasChildren;
// Assume that we have retrieved a node (pNode) using the database object (pDb). See if it has any child nodes
rc = pNode->hasChildren( pDb, &bHasChildren);
See Also: hasNextSibling, hasPreviousSibling, hasAttribute, hasAttributes
RCODE isNamespaceDecl(
IF_Db * pDb,
FLMBOOL * pbIsNamespaceDecl);
Determine if the node is a namespace declaration. This should only be called on attribute nodes.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMBOOL * pbIsNamespaceDecl A boolean flag that indicates whether or not the node is a namespace declaration node.
Example Code:
IF_DOMNode * pAttrNode;
IF_Db * pDb;
FLMBOOL bIsNamespaceDecl;
// Assume that we have retrieved an attribute node (pAttrNode) using the database object (pDb). See if it is a namespace declaration.
rc = pAttrNode->isNamespaceDecl( pDb, &bIsNamespaceDecl);
See Also:
eDomNodeType
getNodeType( void);
Method to retrieve the current node's type.
Parameters In: none.
Parameters Out: none.
See Also: getDataType, getDataLength
RCODE getNodeId(
IF_Db * pDb,
FLMUINT64 * pui64NodeId);
Get the node id of the node. NOTE: This must not be called on attribute nodes as they do not have node ids.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUINT64 * pui64NodeId The node id is returned here.
Example Code:
IF_DOMNode * pDocument = NULL;
RCODE rc;
FLMUINT64 ui64NodeId;
if ( RC_BAD( rc = pDb->createDocument( XFLM_DATA_COLLECTION, DOCUMENT_NODE, &pDocument)))
{
goto Exit;
}
// Get the node Id.
if (RC_BAD( rc = pDocument->getNodeId( pDb, &ui64NodeId)))
{
goto Exit;
}
See Also: getParentId, getDocumentId, getPrevSibId, getNextSibId, getFirstChildId, getLastChildId
RCODE getParentId(
IF_Db * pDb,
FLMUINT64 * pui64ParentId);
Get the node id of the node's parent node.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUINT64 * pui64ParentId The parent's node id is returned here.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUINT64 ui64ParentId;
// Assume that we have retrieved a node (pNode) using the database object (pDb). Get the node id of its parent node, if any.
rc = pNode->getParentId( pDb, &ui64ParentId);
See Also: getNodeId, getDocumentId, getPrevSibId, getNextSibId, getFirstChildId, getLastChildId
RCODE getDocumentId(
IF_Db * pDb,
FLMUINT64 * pui64DocumentId);
Get the node's document id. This is the node id of the root node of the document this node belongs to.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUINT64 * pui64DocumentId The document id is returned here.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUINT64 ui64DocumentId;
// Assume that we have retrieved a node (pNode) using the database object (pDb). Get the document id of the document it belongs to.
rc = pNode->getDocumentId( pDb, &ui64DocumentId);
See Also: getNodeId, getParentId, getPrevSibId, getNextSibId, getFirstChildId, getLastChildId
RCODE getPrevSibId(
IF_Db * pDb,
FLMUINT64 * pui64PrevSibId);
Get the node's previous sibling id. NOTE: Must not be called on attribute nodes, as they do not have a previous sibling id.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUINT64 * pui64PrevSibId Previous sibling id is returned here.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUINT64 ui64PrevSiblingId;
// Assume that we have retrieved a node (pNode) using the database object (pDb). Get the node id of the previous sibling, if any.
rc = pNode->getPrevSibId( pDb, &ui64PrevSiblingId);
See Also: getNodeId, getParentId, getDocumentId, getNextSibId, getFirstChildId, getLastChildId
RCODE getNextSibId(
IF_Db * pDb,
FLMUINT64 * pui64NextSibId);
Get the node's next sibling id. NOTE: Must not be called on attribute nodes, as they do not have a next sibling id.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUINT64 * pui64NextSibId Next sibling id is returned here.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUINT64 ui64NextSiblingId;
// Assume that we have retrieved a node (pNode) using the database object (pDb). Get the node id of the next sibling, if any.
rc = pNode->getNextSibId( pDb, &ui64NextSiblingId);
See Also: getNodeId, getParentId, getDocumentId, getPrevSibId, getFirstChildId, getLastChildId
RCODE getFirstChildId(
IF_Db * pDb,
FLMUINT64 * pui64FirstChildId);
Get the node's first child id. NOTE: Must not be called on attribute nodes, as they do not have a first child id.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUINT64 * pui64FirstChildId First child id is returned here.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUINT64 ui64FirstChildId;
// Assume that we have retrieved a node (pNode) using the database object (pDb). Get the node id of the first child, if any.
rc = pNode->getFirstChildId( pDb, &ui64FirstChildId);
See Also: getNodeId, getParentId, getDocumentId, getPrevSibId, getNextSibId, getLastChildId
RCODE getLastChildId(
IF_Db * pDb,
FLMUINT64 * pui64LastChildId);
Get the node's last child id. NOTE: Must not be called on attribute nodes, as they do not have a last child id.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUINT64 * pui64LastChildId Last child id is returned here.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUINT64 ui64LastChildId;
// Assume that we have retrieved a node (pNode) using the database object (pDb). Get the node id of the last child, if any.
rc = pNode->getLastChildId( pDb, &ui64LastChildId);
See Also: getNodeId, getParentId, getDocumentId, getPrevSibId, getNextSibId, getFirstChildId
RCODE getNameId(
IF_Db * pDb,
FLMUINT * puiNameId);
Get the node's name id. If the node is an element node, this will be the element name id. If the node is an attribute, it will be the attribute name id. If the node is a data node, it will be an element name id. No other nodes have name ids, so they should return zero.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUINT * puiNameId The name id for the node. Zero is returned if the node does not have a name id.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUINT uiNameId;
// Assume that we have retrieved a node (pNode) using the database object (pDb). Get the name id of the node, if any.
rc = pNode->getNameId( pDb, &uiNameId);
See Also:
RCODE getEncDefId(
IF_Db * pDb,
FLMUINT * puiEncDefId);
Get the node's encryption definition id. If the node is not encrypted, it will return a zero.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUINT * puiEncDefId The encryption definition id that is being used to encrypt this node. Zero is returned if no encryption is being used.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUINT uiEncDefId;
// Assume that we have retrieved a node (pNode) using the database object (pDb). Get the name id of the node, if any.
rc = pNode->getEncDefId( pDb, &uiEncDefId);
See Also:
RCODE getDataType(
IF_Db * pDb,
FLMUINT * puiDataType);
Get the data type of the node.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUINT * puiDataType The data type. Will return one of the following:
- XFLM_NODATA_TYPE - This is a node that has no data type associated with it. It cannot store data.
- XFLM_TEXT_TYPE - Node may contain string data - use unicode or UTF8 methods to get/set data.
- XFLM_NUMBER_TYPE - Node may contain numeric data - use integer methods to get/set data.
- XFLM_BINARY_TYPE - Node may contain binary data - use binary methods to get/set data.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
RCODE rc;
FLMUINT uiDataType;
FLMUINT64 ui64Value;
App_DynaBuf dynaBuf; // Application implementation of the IF_DynaBuf interface
// Assume that we have already retrieved a node (pNode) using pDb
if (RC_BAD( rc = pNode->getDataType( pDb, &uiDataType)))
{
goto Exit;
}
switch (uiDataType)
{
case XFLM_TEXT_TYPE:
{rc = pNode->getUnicode( pDb, &dynaBuf);
// do something with value here
}
case XFLM_NUMBER_TYPE:
{rc = pNode->getUINT64( pDb, &ui64Value);
// do something with value here
}case XFLM_BINARY_TYPE:
{
rc = pNode->getBinary( pDb, &dynaBuf);
// do something with value here
}
}
..
.
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE getDataLength(
IF_Db * pDb,
FLMUINT * puiLength);
This is a method to get the size of the node's value. NOTE: This method really only has meaning for binary data values. Although it will return a length for nodes that have numeric and string values, it is of little use, because it represents the length of the internal storage format. For nodes with string and numeric values its primary use would be to determine if the node has a value at all.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUINT * puiLength The size (in bytes) of the node's value. NOTE: This is the internal storage length.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUINT uiLength;
// Assume that we have retrieved a node (pNode) using the database object (pDb).
rc = pNode->getDataLength( pDb, &uiLength);
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE getUINT32(
IF_Db * pDb,
FLMUINT32 * pui32Value);
Get the value of the node as a 32 bit unsigned integer.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUINT32 * pui32Value The value of the node is returned here as a 32 bit unsigned integer.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUINT32 ui32Value;
// Assume that we have retrieved a node (pNode) using the database object (pDb).
rc = pNode->getUINT32( pDb, &ui32Value);
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE getUINT(
IF_Db * pDb,
FLMUINT * puiValue);
Get the value of the node as an unsigned integer.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUINT * puiValue The value of the node is returned here as an unsigned integer.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUINT uiValue;
// Assume that we have retrieved a node (pNode) using the database object (pDb).
rc = pNode->getUINT( pDb, &uiValue);
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE getUINT64(
IF_Db * pDb,
FLMUINT64 * pui64Value);
Get the value of the node as a 64 bit unsigned integer.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUINT64 * pui64Value The value of the node is returned here as a 64 bit unsigned integer.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUINT64 ui64Value;
// Assume that we have retrieved a node (pNode) using the database object (pDb).
rc = pNode->getUINT64( pDb, &ui64Value);
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE getINT32(
IF_Db * pDb,
FLMINT32 * pi32Value);
Get the value of the node as a a signed integer.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMINT32 * pi32Value The value of the node is returned here as a 32 bit signed integer.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMINT32 i32Value;
// Assume that we have retrieved a node (pNode) using the database object (pDb).
rc = pNode->getINT32( pDb, &i32Value);
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE getINT(
IF_Db * pDb,
FLMINT * piValue);
Get the value of the node as a a signed integer.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMINT * piValue The value of the node is returned here as a signed integer.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMINT iValue;
// Assume that we have retrieved a node (pNode) using the database object (pDb).
rc = pNode->getINT( pDb, &iValue);
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE getINT64(
IF_Db * pDb,
FLMINT64 * pi64Value);
Get the value of the node as a 64 bit signed integer.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMINT64 * pi64Value The value of the node is returned here as a 64 bit signed integer.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMINT64 i64Value;
// Assume that we have retrieved a node (pNode) using the database object (pDb).
rc = pNode->getINT64( pDb, &i64Value);
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE getMetaValue(
IF_Db * pDb,
FLMUINT64 * pui64Value);
Get the metavalue of the node as a 64 bit unsigned integer.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUINT64 * pui64Value The metavalue of the node is returned here as a 64 bit unsigned integer.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUINT64 ui64MetaValue;
// Assume that we have retrieved a node (pNode) using the database object (pDb).
rc = pNode->getMetaValue( pDb, &ui64MetaValue);
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE getUnicodeChars(
IF_Db * pDb,
FLMUINT * puiNumChars );
Return the number of unicode characters in the node.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUINT * puiNumChars Returns the number of unicode characters in the node value.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUINT uiNumChars;
// Assume that we have retrieved a node (pNode) using the database object (pDb).
rc = pNode->getUnicodeChars( pDb, &uiNumChars);
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE getUnicode(
IF_Db * pDb,
FLMUNICODE * puzValueBuffer,
FLMUINT uiBufferSize,
FLMUINT uiCharOffset,
FLMUINT uiMaxCharsRequested,
FLMUINT * puiCharsReturned = NULL,
FLMUINT * puiBufferBytesUsed = NULL);
Get the value of the node as a unicode string.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiBufferSize The size of the the buffer (in bytes) pointed to by puzValueBuffer. This size will not be exceeded. FLMUINT uiCharOffset The character offset to retrieve from. The purpose of this parameter is to allow an application to retrieve the string a piece at a time using multiple calls. If the entire string is to be retrieved in a single call, this parameter should be set to zero. FLMUINT uiMaxCharsRequested This is the maximum number of characters to be returned. To get all of the characters, use FLM_MAX_UINT.
Parameters Out:
FLMUNICODE * puzValueBuffer The value of the attribute as a unicode string. Note that the string will be null-terminated if there is room in the buffer. NOTE: If a NULL is passed here, this method will return the size of the buffer needed to retrieve all of the data in *puiBufferBytesUsed (provided that puiBufferBytesUsed is non-NULL). It will also return the total number of characters in *puiCharsReturned (provided puiCharsReturned is non-NULL). FLMUINT * puiCharsReturned The number of unicode characters written to the buffer puzValueBuffer - does not include null terminating character. If puzValueBuffer is NULL, this will return the total number of characters that would have been returned if puzValueBuffer had been non-NULL. FLMUINT * puiBufferBytesUsed The number of bytes returned in the buffer puzValueBuffer - includes bytes for null terminating character. If puzValueBuffer is NULL, this will return the total number of bytes that would be needed to return the entire string (including a null-terminating character). In this way, an application could first make a call to this method to determine how much buffer space it will need, then allocate the space, then call it again to get the data. This is basically what getUnicode(2) does.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUNICODE uzValueBuffer [100];
FLMUINT uiNumChars;
FLMUINT uiNumBytes;
// Assume that we have retrieved the node (pNode) using the database object (pDb).
rc = pNode->getUnicode( pDb, uzValueBuffer , sizeof( uzValueBuffer ), 0, FLM_MAX_UINT, &uiNumChars, &uiNumBytes);
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE getUnicode(
IF_Db * pDb,
FLMUNICODE ** ppuzUnicodeValue);
Get the value of the node as a unicode string. This method will allocate a buffer and return it's address in the ppuzUnicodeValue parameter. When the application is finished with the buffer, it must be freed using the freeMem method off the IF_DbSystem object.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUNICODE ** ppuzUnicodeValue A pointer to the allocated buffer which contains the unicode string is returned here.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUNICODE * puzUnicodeValue = NULL;
// Assume that we have retrieved the node (pNode) using the database object (pDb).
rc = pNode->getUnicode( pDb, &puzUnicodeValue);
// Do stuff with the string, then free it
.
.
.
pDbSystem->freeMem( &puzUnicodeValue);
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE getUnicode(
IF_Db *
pDb,
IF_DynaBuf **
pDynaBuf);
This is a method to retrieve the value of a node as a unicode string. The string is returned in an IF_DynaBuf object. The application must supply the implementation of the IF_DynaBuf object.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
IF_DynaBuf * pDynaBuf Pointer to the IF_DynaBuf object where the unicode string is returned. XFLAIM calls methods of the IF_DynaBuf interface to inject data into the object.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
App_DyanBuf dynaBuf; // Application implementation of the IF_DynaBuf interface
// Assume that we have retrieved the node (pNode) using the database object (pDb).
rc = pNode->getUnicode( pDb, &dynaBuf);
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE getUTF8(
IF_Db * pDb,
FLMBYTE * pszValueBuffer,
FLMUINT uiBufferSize,
FLMUINT uiCharOffset,
FLMUINT uiMaxCharsRequested,
FLMUINT * puiCharsReturned = NULL,
FLMUINT * puiBufferBytesUsed = NULL);
Get the value of the node as a UTF8 string.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiBufferSize The size of the the buffer (in bytes) pointed to by pszValueBuffer. This size will not be exceeded. FLMUINT uiCharOffset The character offset to retrieve from. The purpose of this parameter is to allow an application to retrieve the string a piece at a time using multiple calls. If the entire string is to be retrieved in a single call, this parameter should be set to zero. FLMUINT uiMaxCharsRequested This is the maximum number of characters to be returned. To get all of the characters, use FLM_MAX_UINT.
Parameters Out:
FLMUNICODE * pszValueBuffer The value of the attribute as a unicode string. Note that the string will be null-terminated if there is room in the buffer. NOTE: If a NULL is passed here, this method will return the size of the buffer needed to retrieve all of the data in *puiBufferBytesUsed (provided that puiBufferBytesUsed is non-NULL). It will also return the total number of characters in *puiCharsReturned (provided puiCharsReturned is non-NULL). FLMUINT * puiCharsReturned The number of unicode characters written to the buffer pszValueBuffer- does not include null terminating character. If pszValueBuffer is NULL, this will return the total number of characters that would have been returned if pszValueBuffer had been non-NULL. FLMUINT * puiBufferBytesUsed The number of bytes returned in pszValueBuffer - includes bytes for null terminating character. If pszValueBuffer is NULL, this will return the total number of bytes that would be needed to return the entire string (including a null-terminating character). In this way, an application could first make a call to this method to determine how much buffer space it will need, then allocate the space, then call it again to get the data. This is basically what getUTF8(2) does.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUNICODE uzValueBuffer [100];
FLMUINT uiNumChars;
FLMUINT uiNumBytes;
// Assume that we have retrieved the node (pNode) using the database object (pDb).
rc = pNode->getUnicode( pDb, uzValueBuffer , sizeof( uzValueBuffer ), 0, FLM_MAX_UINT, &uiNumChars, &uiNumBytes);
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE getUTF8(
IF_Db * pDb,
FLMBYTE ** ppszUTF8Value);
Get the value of the node as a unicode string. This method will allocate a buffer and return it's address in the ppszUTF8Value parameter. When the application is finished with the buffer, it must be freed using the freeMem method off the IF_DbSystem object.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMBYTE ** ppszUTF8Value A pointer to the allocated buffer which contains the UTF8 string is returned here.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMBYTE * pszUTF8Value = NULL;
// Assume that we have retrieved the node (pNode) using the database object (pDb).
rc = pNode->getUTF8( pDb, &pszUTF8Value);
// Do stuff with the string, then free it
.
.
.
pDbSystem->freeMem( &pszUTF8Value);
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(3), getBinary(1), getBinary(2)
RCODE getUTF8(
IF_Db *
pDb,
IF_DynaBuf **
pDynaBuf);
This is a method to retrieve the value of a node as a UTF8 string. The string is returned in an IF_DynaBuf object. The application must supply the implementation of the IF_DynaBuf object.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
IF_DynaBuf * pDynaBuf Pointer to the IF_DynaBuf object where the UTF8 string is returned. XFLAIM calls methods of the IF_DynaBuf interface to inject data into the object.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
App_DyanBuf dynaBuf; // Application implementation of the IF_DynaBuf interface
// Assume that we have retrieved the node (pNode) using the database object (pDb).
rc = pNode->getUTF8( pDb, &dynaBuf);
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getBinary(1), getBinary(2)
RCODE getBinary(
IF_Db * pDb,
void * pvValue,
FLMUINT uiByteOffset,
FLMUINT uiBytesRequested,
FLMUINT * puiBytesReturned);
Get the value of the DOM node as binary data..
Parameters In:
IF_Db * pDb Pointer to database object. void * pvValue A buffer to hold the binary value of the node. NOTE: If a NULL is passed here, this method will return the size of the buffer needed to retrieve all of the data in *puiBytesReturned (provided that puiBytesReturned is non-NULL). FLMUINT uiByteOffset The byte offset to retrieve from. The purpose of this parameter is to allow an application to retrieve the binary value a piece at a time using multiple calls. If the entire binary value is to be retrieved in a single call, this parameter should be set to zero. FLMUINT uiBytesRequested This is the maximum number of bytes to be returned. This length will not be exceeded.
Parameters Out:
FLMUINT * puiBytesReturned The actual number of bytes returned. If pvValue is NULL, this will return the total number of bytes that would be needed to return the entire binary value. In this way, an application could first make a call to this method to determine how much buffer space it will need, then allocate the space, then call it again to get the data.
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(2)
RCODE getBinary(
IF_Db *
pDb,
IF_DynaBuf **
pDynaBuf);
This is a method to retrieve the value of a node as binary data. The binary value is returned in an IF_DynaBuf object. The application must supply the implementation of the IF_DynaBuf object.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
IF_DynaBuf * pDynaBuf Pointer to the IF_DynaBuf object where the binary value is returned. XFLAIM calls methods of the IF_DynaBuf interface to inject data into the object.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
App_DyanBuf dynaBuf; // Application implementation of the IF_DynaBuf interface
// Assume that we have retrieved the node (pNode) using the database object (pDb).
rc = pNode->getBinary( pDb, &dynaBuf);
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1)
RCODE getAttributeValueUINT32(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
FLMUINT32 * pui32Num);
This is a method to retrieve the value of an element attribute as a 32 bit unsigned integer. This method is called from the element node that contains the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The name id of the attribute whose value is to be returned.
Parameters Out:
FLMUINT32 * pui32Num The value of the attribute as a 32 bit unsigned integer.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
FLMUINT32 ui32AttrValue;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 27.
rc = pElementNode->getAttributeValueUINT32( pDb, 27, &ui32AttrValue);
See Also: getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE getAttributeValueUINT32(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
FLMUINT32 * pui32Num,
FLMUINT32 ui32NotFoundDefault);
This is a method to retrieve the value of an element attribute as an unsigned integer. This method is called from the element node that contains the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be returned. FLMUINT32 ui32NotFoundDefault The default value to use if the attribute cannot be found.
Parameters Out:
FLMUINT32 * pui32Num The value of the attribute as a 32 bit unsigned integer.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
FLMUINT32 ui32AttrValue;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 27. If the attribute is not found, return a default of 85.
rc = pElementNode->getAttributeValueUINT32( pDb, 27, &ui32AttrValue, 85);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE getAttributeValueUINT(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
FLMUINT *
puiNum);
This is a method to retrieve the value of an element attribute as an unsigned integer. This method is called from the element node that contains the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The name id of the attribute whose value is to be returned.
Parameters Out:
FLMUINT * puiNum The value of the attribute as an unsigned integer.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
FLMUINT uiAttrValue;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 27.
rc = pElementNode->getAttributeValueUINT( pDb, 27, &uiAttrValue);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE getAttributeValueUINT(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
FLMUINT *
puiNum,
FLMUINT
uiNotFoundDefault);
This is a method to retrieve the value of an element attribute as an unsigned integer. This method is called from the element node that contains the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be returned. FLMUINT uiNotFoundDefault The default value to use if the attribute cannot be found.
Parameters Out:
FLMUINT * puiNum The value of the attribute as an unsigned integer.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
FLMUINT uiAttrValue;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 27. If the attribute is not found, return a default of 85.
rc = pElementNode->getAttributeValueUINT( pDb, 27, &uiAttrValue, 85);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE getAttributeValueUINT64(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
FLMUINT64 *
pui64Num);
This is a method to retrieve the value of an element attribute as a 64 bit unsigned integer. This method is called from the element node that contains the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id of the attribute whose value is to be retrieved.
Parameters Out:
FLMUINT64 * pui64Num The value of the attribute as a 64 bit unsigned integer.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
FLMUINT64 ui64AttrValue;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 27.
rc = pElementNode->getAttributeValueUINT64( pDb, 27, &ui64AttrValue);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE getAttributeValueUINT64(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
FLMUINT64 *
pui64Num,
FLMUINT64
ui64NotFoundDefault);
This is a method to retrieve the value of an element attribute as a 64 bit unsigned integer. This method is called from the element node that contains the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id of the attribute whose value is to be retrieved. FLMUINT64 ui64NotFoundDefault The default value to use if the attribute cannot be found.
Parameters Out:
FLMUINT64 * pui64Num The value of the attribute as a 64 bit unsigned integer.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
FLMUINT64 ui64AttrValue;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 27. If the attribute is not found, return a default of 85.
rc = pElementNode->getAttributeValueUINT64( pDb, 27, &ui64AttrValue, 85);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE getAttributeValueINT(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
FLMINT * piNum);
This is a method to retrieve the value of an element attribute as a signed integer. This method is called from the element node that contains the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The name id of the attribute whose value is to be returned.
Parameters Out:
FLMINT * piNum The value of the attribute as a signed integer.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
FLMINT iAttrValue;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 27.
rc = pElementNode->getAttributeValueINT( pDb, 27, &iAttrValue);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE getAttributeValueINT(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
FLMINT * piNum,
FLMINT iNotFoundDefault);
This is a method to retrieve the value of an element attribute as a signed integer. This method is called from the element node that contains the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be returned. FLMINT iNotFoundDefault The default value to use if the attribute cannot be found.
Parameters Out:
FLMINT * piNum The value of the attribute as a signed integer.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
FLMINT iAttrValue;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 27. If the attribute is not found, return a default of 85.
rc = pElementNode->getAttributeValueINT( pDb, 27, &iAttrValue, 85);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE getAttributeValueINT64(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
FLMINT64 * pi64Num);
This is a method to retrieve the value of an element attribute as a 64 bit signed integer. This method is called from the element node that contains the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The name id of the attribute whose value is to be returned.
Parameters Out:
FLMINT64 * pi64Num The value of the attribute as a 64 bit signed integer.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
FLMINT64 i64AttrValue;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 27.
rc = pElementNode->getAttributeValueINT64( pDb, 27, &i64AttrValue);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE getAttributeValueINT64(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
FLMINT64 * pi64Num,
FLMINT64 i64NotFoundDefault);
This is a method to retrieve the value of an element attribute as a 64 bit signed integer. This method is called from the element node that contains the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be returned. FLMINT64 i64NotFoundDefault The default value to use if the attribute cannot be found.
Parameters Out:
FLMINT64 * pi64Num The value of the attribute as a 64 bit signed integer.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
FLMINT64 i64AttrValue;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 27. If the attribute is not found, return a default of 85.
rc = pElementNode->getAttributeValueINT64( pDb, 27, &i64AttrValue, 85);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE getAttributeValueUnicode(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
FLMUNICODE * puzValueBuffer,
FLMUINT uiBufferSize,
FLMUINT * puiCharsReturned = NULL,
FLMUINT * puiBufferBytesUsed = NULL);
This is a method to retrieve the value of an element attribute node as a unicode string. This method is called from the element node that contains the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be returned. FLMUINT uiBufferSize The size of the the buffer (in bytes) pointed to by puzValueBuffer. This size will not be exceeded.
Parameters Out:
FLMUNICODE * puzValueBuffer The value of the attribute as a unicode string. Note that the string will be null-terminated if there is room in the buffer. NOTE: If a NULL is passed here, this method will return the size of the buffer needed to retrieve all of the data in *puiBufferBytesUsed (provided that puiBufferBytesUsed is non-NULL). It will also return the total number of characters in *puiCharsReturned (provided puiCharsReturned is non-NULL). FLMUINT * puiCharsReturned The number of unicode characters written to the buffer puzValueBuffer - does not include null terminating character. If puzValueBuffer is NULL, this will return the total number of characters that would have been returned if puzValueBuffer had been non-NULL. FLMUINT * puiBufferBytesUsed The number of bytes returned in the buffer puzValueBuffer - includes bytes for null terminating character. If puzValueBuffer is NULL, this will return the total number of bytes that would be needed to return the entire string (including a null-terminating character). In this way, an application could first make a call to this method to determine how much buffer space it will need, then allocate the space, then call it again to get the data. This is basically what getAttributeValueUnicode(2) does.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
FLMUNICODE uzValueBuffer [100];
FLMUINT uiNumChars;
FLMUINT uiNumBytes;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 45.
rc = pElementNode->getAttributeValueUnicode( pDb, 45, uzValueBuffer , sizeof( uzValueBuffer ), &uiNumChars, &uiNumBytes);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE getAttributeValueUnicode(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
FLMUNICODE ** ppuzValueBuffer);
This is a method to retrieve the value of an element attribute node as a unicode string. Memory for the string is allocated and returned. This method is called from the element node that contains the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be returned.
Parameters Out:
FLMUNICODE ** ppuzValueBuffer The value of the attribute as a unicode string. The buffer will be allocated by this method. When the application is done using the buffer, it should free it by calling IF_DbSystem::freeMem( ppuzValueBuffer).
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
FLMUNICODE * puzValueBuffer = NULL;
FLMUINT uiNumChars;
FLMUINT uiNumBytes;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 45.
rc = pElementNode->getAttributeValueUnicode( pDb, 45, &puzValueBuffer);
// Use the value returned in puzBuffer, then free it
.
.
pDbSystem->freeMem( &puzValueBuffer);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE getAttributeValueUnicode(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
IF_DynaBuf **
pDynaBuf);
This is a method to retrieve the value of an element attribute node as a unicode string. The string is returned in an IF_DynaBuf object. The application must supply the implementation of the IF_DynaBuf object. This method is called from the element node that contains the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be returned.
Parameters Out:
IF_DynaBuf * pDynaBuf Pointer to the IF_DynaBuf object where the unicode string is returned. XFLAIM calls methods of the IF_DynaBuf interface to inject data into the object.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
App_DyanBuf dynaBuf; // Application implementation of the IF_DynaBuf interface
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 45.
rc = pElementNode->getAttributeValueUnicode( pDb, 45, &dynaBuf);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE getAttributeValueUTF8(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
FLMBYTE * pszValueBuffer,
FLMUINT uiBufferSize,
FLMUINT * puiCharsReturned = NULL,
FLMUINT * puiBufferBytesUsed = NULL);
This is a method to retrieve the value of an element attribute as a UTF8 string. This method is called from the element node that contains the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be returned. FLMUINT uiBufferSize The size of the the buffer (in bytes) pointed to by pszValueBuffer. This size will not be exceeded.
Parameters Out:
FLMBYTE * pszValueBuffer The value of the attribute as a UTF8 string. Note that the string will be null-terminate if there is room in the buffer. NOTE: If a NULL is passed here, this method will return the size of the buffer needed to retrieve all of the data in *puiBufferBytesUsed (provided that puiBufferBytesUsed is non-NULL). It will also return the total number of characters in *puiCharsReturned (provided puiCharsReturned is non-NULL). FLMUINT * puiCharsReturned The number of UTF8 characters written to the buffer pszValueBuffer - does not include null terminating character. If pszValueBuffer is NULL, this will return the total number of characters that would have been returned if pszValueBuffer had been non-NULL. FLMUINT * puiBufferBytesUsed The number of bytes returned in the buffer pszValueBuffer - includes bytes for null terminating character. If pszValueBuffer is NULL, this will return the total number of bytes that would be needed to return the entire string (including a null-terminating character). In this way, an application could first make a call to this method to determine how much buffer space it will need, then allocate the space, then call it again to get the data. This is basically what getAttributeValueUTF8(2) does.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
FLMBYTE ucUtf8Value [100];
FLMUINT uiNumChars;
FLMUINT uiNumBytes;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 45.
rc = pElementNode->getAttributeValueUTF8( pDb, 45, ucUtf8Value , sizeof( ucUtf8Value ), &uiNumChars, &uiNumBytes);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE getAttributeValueUTF8(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
FLMBYTE ** ppszValueBuffer);
This is a method to retrieve the value of an element attribute as a UTF8 string. Memory for the string is allocated and returned. This method is called from the element node that contains the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be returned.
Parameters Out:
FLMBYTE ** ppszValueBuffer The value of the attribute as a UTF8 string. The buffer will be allocated by this method. When the application is done using the buffer, it should free it by calling IF_DbSystem::freeMem( ppszValueBuffer).
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
FLMBYTE * pszUtf8Value = NULL;
FLMUINT uiNumChars;
FLMUINT uiNumBytes;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 45.
rc = pElementNode->getAttributeValueUTF8( pDb, 45, &pszUtf8Value );
// Use the value returned in puzBuffer, then free it
.
.
pDbSystem->freeMem( &pszUtf8Value );
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE getAttributeValueUTF8(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
IF_DynaBuf **
pDynaBuf);
This is a method to retrieve the value of an element attribute as a UTF8 string. The string is returned in an IF_DynaBuf object. The application must supply the implementation of the IF_DynaBuf object. This method is called from the element node that contains the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be returned.
Parameters Out:
IF_DynaBuf * pDynaBuf Pointer to the IF_DynaBuf object where the UTF8 string is returned. XFLAIM calls methods of the IF_DynaBuf interface to inject data into the object.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
App_DyanBuf dynaBuf; // Application implementation of the IF_DynaBuf interface
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 45.
rc = pElementNode->getAttributeValueUTF8( pDb, 45, &dynaBuf);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE getAttributeValueBinary(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
void * pvValueBuffer,
FLMUINT uiBufferSize,
FLMUINT * puiValueLength);
This is a method to retrieve the value of an element attribute as binary data. This method is called from the element node that contains the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be returned. FLMUINT uiBufferSize The size of the buffer (in bytes) pointed to by pvValueBuffer. This size will not be exceeded.
Parameters Out:
void * pvValueBuffer The value of the attribute as binary data. NOTE: If a NULL is passed here, this method will return the size of the buffer needed to retrieve all of the data in *puiValueLength. FLMUINT * puiValueLength The length of the value returned in pvValueBuffer. If pvValueBuffer is NULL, this will return the total number of bytes that would be needed to return the entire binary value. In this way, an application could first make a call to this method to determine how much buffer space it will need, then allocate the space, then call it again to get the data.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
FLMBYTE ucBinaryValue [100];
FLMUINT uiValueLength;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 65.
rc = pElementNode->getAttributeValueBinary( pDb, 65, ucBinaryValue , sizeof( ucBinaryValue ), &uiValueLength);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE getAttributeValueBinary(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
IF_DynaBuf **
pDynaBuf);
This is a method to retrieve the value of an element attribute as a binary value. The value is returned in an IF_DynaBuf object. The application must supply the implementation of the IF_DynaBuf object. This method is called from the element node that contains the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be returned.
Parameters Out:
IF_DynaBuf * pDynaBuf Pointer to the IF_DynaBuf object where the binary value is returned. XFLAIM calls methods of the IF_DynaBuf interface to inject data into the object.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
App_DyanBuf dynaBuf; // Application implementation of the IF_DynaBuf interface
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 45.
rc = pElementNode->getAttributeValueUTF8( pDb, 65, &dynaBuf);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE setUINT(
IF_Db * pDb,
FLMUINT uiValue,
FLMUINT uiEncDefId = 0);
Set the value of the node to an unsigned integer.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiValue The value to be set. FLMUINT uiEncDefId Encryption definition to use to encrypt the data. If zero, data will not be encrypted.
Parameters Out: none.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have retrieved a node (pNode) using the database object (pDb).
// Set it to a value of 33.
rc = pNode->setUINT( pDb, 33, 0);
See Also: setUINT64, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE setUINT64(
IF_Db * pDb,
FLMUINT64 ui64Value,
FLMUINT uiEncDefId = 0);
Set the value of the node to a 64 bit unsigned integer.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT64 ui64Value The value to be set. FLMUINT uiEncDefId Encryption definition to use to encrypt the data. If zero, data will not be encrypted.
Parameters Out: none.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have retrieved a node (pNode) using the database object (pDb).
// Set it to a value of 33.
rc = pNode->setUINT64( pDb, 33, 0);
See Also: setUINT, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE setINT(
IF_Db * pDb,
FLMINT iValue,
FLMUINT uiEncDefId = 0);
Set the value of the node using a signed integer.
Parameters In:
IF_Db * pDb Pointer to database object. FLMINT iValue The value to be set. FLMUINT uiEncDefId Encryption definition to use to encrypt the data. If zero, data will not be encrypted.
Parameters Out: none.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have retrieved a node (pNode) using the database object (pDb).
// Set it to a value of -33.
rc = pNode->setINT( pDb, -33, 0);
See Also: setUINT, setUINT64, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE setINT64(
IF_Db * pDb,
FLMINT64 i64Value,
FLMUINT uiEncDefId = 0);
Set the value of the node to a 64 bit signed integer.
Parameters In:
IF_Db * pDb Pointer to database object. FLMINT64 i64Value The value to be set. FLMUINT uiEncDefId Encryption definition to use to encrypt the data. If zero, data will not be encrypted.
Parameters Out: none.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have retrieved a node (pNode) using the database object (pDb).
// Set it to a value of -33.
rc = pNode->setINT64( pDb, -33, 0);
See Also: setUINT, setUINT64, setINT, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE setMetaValue(
IF_Db * pDb,
FLMUINT64 ui64Value);
Set the meta value of the node to a 64 bit unsigned integer.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT64 ui64Value The value to be set.
Parameters Out: none.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have retrieved a node (pNode) using the database object (pDb).
// Set its metavalue to a value of 33.
rc = pNode->setMetaValue( pDb, 33);
See Also: setUINT, setINT, setINT64, setUnicode, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE setUnicode(
IF_Db * pDb,
FLMUNICODE * puzValue,
FLMUINT uiValueLength= 0,
FLMBOOL bLast = TRUE,
FLMUINT uiEncDefId = 0);
Set the value of the node to a unicode string. Note that this method may be called multiple times to effectively "stream" a large data string into the node. The bLast parameter should be set to FALSE for all except the final call. When multiple calls are used, the string passed in on each call is appended to the data from the last call (except for the first call).
Parameters In:
IF_Db * pDb Pointer to database object. FLMUNICODE * puzValue Pointer to the unicode character string. FLMUINT uiValueLength The length (in bytes) of the unicode string. If this parameter is zero, it is assumed that the puzValue string is null-terminated. Note that if this parameter is non-zero, but there is a null character before the end specified, only the characters up to the null character will be input to the node. FLMBOOL bLast A boolean flag which tells whether or not there is more data to follow. When this value is set to FALSE, the underlying code will expect to receive subsequent calls to append additional data. This allows a large string to be "streamed" into the node using multiple calls if needed. FLMUINT uiEncDefId Encryption definition to use to encrypt the data. If zero, data will not be encrypted. NOTE: If multiple calls are used to "stream" in the data, the encryption definition must be the same for each call. XFLAIM really only uses the encryption definition id of the first call to encrypt the data anyway. It is ignored on subsequent calls.
Parameters Out: none.
Example Code:
IF_DOMNode * pNode;
FLMUNICODE * puzValue = {'a', 'b', 'c', 0};
IF_Db * pDb;
// Assume that we have retrieved a node (pNode) using the database object (pDb).
// Set it to a value of "abc"
rc = pNode->setUnicode( pDb, puzValue, 0, TRUE, 0);
See Also: setUINT, setUINT64, setINT, setINT64, setUTF8, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE setUTF8(
IF_Db * pDb,
FLMBYTE * pszValue,
FLMUINT uiValueLength= 0,
FLMBOOL bLast = TRUE,
FLMUINT uiEncDefId = 0);
Set the value of the node to a UTF8 string. Note that this method may be called multiple times to effectively "stream" a large data string into the node. The bLast parameter should be set to FALSE for all except the final call. When multiple calls are used, the string passed in on each call is appended to the data from the last call (except for the first call).
Parameters In:
IF_Db * pDb Pointer to database object. FLMBYTE * pszValue Pointer to the UTF8 character string. FLMUINT uiValueLength The length (in bytes) of the UTF8 string. If this parameter is zero, it is assumed that the pszValue string is null-terminated. Note that if this parameter is non-zero, but there is a null character before the end specified, only the characters up to the null character will be input to the node. FLMBOOL bLast A boolean flag which tells whether or not there is more data to follow. When this value is set to FALSE, the underlying code will expect to receive subsequent calls to append additional data. This allows a large string to be "streamed" into the node using multiple calls if needed. FLMUINT uiEncDefId Encryption definition to use to encrypt the data. If zero, data will not be encrypted. NOTE: If multiple calls are used to "stream" in the data, the encryption definition must be the same for each call. XFLAIM really only uses the encryption definition id of the first call to encrypt the data anyway. It is ignored on subsequent calls.
Parameters Out: none.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have retrieved a node (pNode) using the database object (pDb).
// Set it to a value of "abc"
rc = pNode->setUTF8( pDb, (FLMBYTE *)"abc", 0, TRUE, 0);
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setBinary, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE setBinary(
IF_Db * pDb,
FLMBYTE * pucValue,
FLMUINT uiValueLength,
FLMBOOL bLast = TRUE,
FLMUINT uiEncDefId = 0);
Set the value of the node to binary data. Note that this method may be called multiple times to effectively "stream" a large binary data value into the node. The bLast parameter should be set to FALSE for all except the final call. When multiple calls are used, the binary data passed in on each call is appended to the data from the last call (except for the first call).
Parameters In:
IF_Db * pDb Pointer to database object. FLMBYTE * pucValue Pointer to the buffer of binary data. FLMUINT uiValueLength The length (in bytes) of the binary data. FLMBOOL bLast A boolean flag which tells whether or not there is more data to follow. When this value is set to FALSE, the underlying code will expect to receive subsequent calls to append additional data. This allows a large binary data value to be "streamed" into the node using multiple calls if needed. FLMUINT uiEncDefId Encryption definition to use to encrypt the data. If zero, data will not be encrypted. NOTE: If multiple calls are used to "stream" in the data, the encryption definition must be the same for each call. XFLAIM really only uses the encryption definition id of the first call to encrypt the data anyway. It is ignored on subsequent calls.
Parameters Out: none.
See Also: setUINT, setUINT64, setINT, setINT64, setUnicode, setUTF8, getDataType, getDataLength, getUINT32, getUINT, getUINT64, getINT32, getINT, getINT64, getUnicodeChars, getUnicode(1), getUnicode(2), getUnicode(3), getUTF8(1), getUTF8(2), getUTF8(3), getBinary(1), getBinary(2)
RCODE setAttributeValueUINT(
IF_Db * pDb,
FLMUINT uiAttrNameId,
FLMUINT
uiValue,
FLMUINT uiEncDefId = 0);
This is a method to set the value of an element attribute to an unsigned integer. This method is called from the element node containing the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be set. FLMUINT uiValue The value the attribute is to be set to. FLMUINT uiEncDefId Encryption definition to use to encrypt the data. If zero, data will not be encrypted.
Parameters Out: none.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 45. Set an unsigned integer value of 33.
rc = pElementNode->setAttributeValueUINT( pDb, 45, 33, 0);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE setAttributeValueUINT64(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
FLMUINT64
ui64Value,
FLMUINT uiEncDefId = 0);
This is a method to set the value of an element attribute to a 64 bit unsigned integer. This method is called from the element node containing the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be set. FLMUINT64 ui64Value The value the attribute is to be set to FLMUINT uiEncDefId Encryption definition to use to encrypt the data. If zero, data will not be encrypted.
Parameters Out: none.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 45. Set a 64 bit unsigned integer value of 33.
rc = pElementNode->setAttributeValueUINT64( pDb, 45, 33, 0);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE setAttributeValueINT(
IF_Db * pDb,
FLMUINT uiAttrNameId,
FLMINT iValue,
FLMUINT uiEncDefId = 0);
This is a method to set the value of an element attribute to a signed integer. This method is called from the element node containing the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be set. FLMINT iValue The value the attribute is to be set to. FLMUINT uiEncDefId Encryption definition to use to encrypt the data. If zero, data will not be encrypted.
Parameters Out: none.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 45. Set an unsigned integer value of -33.
rc = pElementNode->setAttributeValueINT( pDb, 45, -33, 0);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE setAttributeValueINT64(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
FLMINT64
i64Value,
FLMUINT uiEncDefId = 0);
This is a method to set the value of an element attribute to a 64 bit signed integer. This method is called from the element node containing the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be set. FLMINT64 i64Value The value the attribute is to be set to FLMUINT uiEncDefId Encryption definition to use to encrypt the data. If zero, data will not be encrypted.
Parameters Out: none.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 45. Set a 64 bit signed integer value of -33.
rc = pElementNode->setAttributeValueINT64( pDb, 45, -33, 0);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueUnicode, setAttributeValueUTF8, setAttributeValueBinary
RCODE setAttributeValueUnicode(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
FLMUNICODE * puzValue,
FLMUINT uiEncDefId = 0);
This is a method to set the value of an element attribute to a unicode string. This method is called from the element node containing the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be set. FLMUNICODE * puzValue The value the attribute is to be set to. FLMUINT uiEncDefId Encryption definition to use to encrypt the data. If zero, data will not be encrypted.
Parameters Out: none.
Example Code:
IF_DOMNode * pElementNode;
FLMUNICODE * puzUnicodeValue = {'a', 'b', 'c', 0};
IF_Db * pDb;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 55. Set a unicode value of "abc".
rc = pElementNode->setAttributeValueUnicode( pDb, 55, puzUnicodeValue, 0);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUTF8, setAttributeValueBinary
RCODE setAttributeValueUTF8(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
FLMBYTE *
pucValue,
FLMUINT uiValueLength = 0,
FLMUINT uiEncDefId = 0);
This is a method to set the value of an element attribute to a UTF8 string. This method is called from the element node containing the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be set. FLMBYTE * pucValue The value the attribute is to be set to. FLMUINT uiValueLength The length (in bytes, not UTF8 characters) of the value. If zero, it is assumed that the UTF8 string is null-terminated. If non-zero, this is the maximum number of bytes that will be stored from the UTF8 string. The length must end on a proper UTF8 character boundary. Note that if the string is null-terminated prior to the spot indicated by this length parameter, only that much of the string will be stored. Hence, XFLAIM stores up to either the null-termination character, or the length specified, whichever comes first. FLMUINT uiEncDefId Encryption definition to use to encrypt the data. If zero, data will not be encrypted.
Parameters Out: none.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 55. Set a UTF8 value of "abc".
rc = pElementNode->setAttributeValueUTF8( pDb, 55, (FLMBYTE *)"abc", 0, 0);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueBinary
RCODE setAttributeValueBinary(
IF_Db *
pDb,
FLMUINT
uiAttrNameId,
void * pvValue,
FLMUINT uiValueLength,
FLMUINT uiEncDefId = 0);
This is a method to set the value of an element attribute to binary data. This method is called from the element node containing the attribute.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiAttrNameId The attribute name id for the attribute whose value is to be set. void * pvValue Buffer containing the binary data the attribute is to be set to. FLMUINT uiValueLength Length of data in pvValue. FLMUINT uiEncDefId Encryption definition to use to encrypt the data. If zero, data will not be encrypted.
Parameters Out: none.
Example Code:
IF_DOMNode * pElementNode;
IF_Db * pDb;
FLMBYTE ucBinaryBuffer [100];
// Assume that we have retrieved the element node (pElementNode) using the database object (pDb).
// Assume that it has an attribute whose name id is 65. Set it to a zero-filled binary buffer of 100 bytes.
memset( ucBinaryBuffer, 0, sizeof( ucBinaryBuffer);
rc = pElementNode->setAttributeValueBinary( pDb, 65, ucBinaryBuffer, sizeof( ucBinaryBuffer), 0);
See Also: getAttributeValueUINT32(1), getAttributeValueUINT32(2), getAttributeValueUINT(1), getAttributeValueUINT(2), getAttributeValueUINT64(1), getAttributeValueUINT64(2), getAttributeValueINT(1), getAttributeValueINT(2), getAttributeValueINT64(1), getAttributeValueINT64(2), getAttributeValueUnicode(1), getAttributeValueUnicode(2), getAttributeValueUnicode(3), getAttributeValueUTF8(1), getAttributeValueUTF8(2), getAttributeValueUTF8(3), getAttributeValueBinary(1), getAttributeValueBinary(2), setAttributeValueUINT, setAttributeValueUINT64, setAttributeValueINT, setAttributeValueINT64, setAttributeValueUnicode, setAttributeValueUTF8
RCODE getDocumentNode(
IF_Db * pDb,
IF_DOMNode ** ppDocument);
Get the node's document node, if any. This will be the root node of the document that contains the node.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
IF_DOMNode ** ppDocument A pointer to the document node is returned. This is the root node of the document that contains the node. Note that if *ppDocument is currently pointing to another node, it will be released before returning the document node.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have already retrieved pNode, and we simply want to move to pNode's document node.
rc = pNode->getDocumentNode( pDb, &pNode);
See Also: IF_Db::getNode, getNextDocument, getPreviousDocument, getParentNode, getFirstChild, getLastChild, getNextSibling, getPreviousSibling, getChild, getChildElement, getSiblingElement, getAncestorElement, getDescendantElement
RCODE getNextDocument(
IF_Db * pDb,
IF_DOMNode ** ppNextDocument);
Get the next document of the document that contains the node.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
IF_DOMNode ** ppNextDocument A pointer to the next document root node is returned. Note that if *ppNextDocument is currently pointing to another node, it will be released before returning the next document root node.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have already retrieved pNode, and we simply want to move to the next document of the document it is
// a part of.
rc = pNode->getNextDocument( pDb, &pNode);
See Also: IF_Db::getNode, getDocumentNode, getPreviousDocument, getParentNode, getFirstChild, getLastChild, getNextSibling, getPreviousSibling, getChild, getChildElement, getSiblingElement, getAncestorElement, getDescendantElement
RCODE getPreviousDocument(
IF_Db * pDb,
IF_DOMNode ** ppPrevDocument);
Get the previous document of the document that contains the node.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
IF_DOMNode ** ppPrevDocument A pointer to the previous document root node is returned. Note that if *ppPrevDocument is currently pointing to another node, it will be released before returning the previous document root node.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have already retrieved pNode, and we simply want to move to the previous document of the document it is
// a part of.
rc = pNode->getPreviousDocument( pDb, &pNode);
See Also: IF_Db::getNode, getDocumentNode, getNextDocument, getParentNode, getFirstChild, getLastChild, getNextSibling, getPreviousSibling, getChild, getChildElement, getSiblingElement, getAncestorElement, getDescendantElement
RCODE getParentNode(
IF_Db * pDb,
IF_DOMNode ** ppParent);
Get the node's parent node, if any.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
IF_DOMNode ** ppParent A pointer to the parent node is returned. Note that if *ppParent is currently pointing to another node, it will be released before returning the parent node.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have already retrieved pNode, and we simply want to move to pNode's parent node.
rc = pNode->getParentNode( pDb, &pNode);
See Also: IF_Db::getNode, getDocumentNode, getNextDocument, getPreviousDocument, getFirstChild, getLastChild, getNextSibling, getPreviousSibling, getChild, getChildElement, getSiblingElement, getAncestorElement, getDescendantElement
RCODE getFirstChild(
IF_Db * pDb,
IF_DOMNode ** ppFirstChild);
Get the node's first child node, if any.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
IF_DOMNode ** ppFirstChild A pointer to the first child node is returned. Note that if *ppFirstChild is currently pointing to another node, it will be released before returning the first child node.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have already retrieved pNode, and we simply want to move to pNode's first child node.
rc = pNode->getFirstChild( pDb, &pNode);
See Also: IF_Db::getNode, getDocumentNode, getNextDocument, getPreviousDocument, getParentNode, getLastChild, getNextSibling, getPreviousSibling, getChild, getChildElement, getSiblingElement, getAncestorElement, getDescendantElement
RCODE getLastChild(
IF_Db * pDb,
IF_DOMNode ** ppLastChild);
Get the node's last child node, if any.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
IF_DOMNode ** ppLastChild A pointer to the last child node is returned. Note that if *ppLastChild is currently pointing to another node, it will be released before returning the last child node.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have already retrieved pNode, and we simply want to move to pNode's last child node.
rc = pNode->getLastChild( pDb, &pNode);
See Also: IF_Db::getNode, getDocumentNode, getNextDocument, getPreviousDocument, getParentNode, getFirstChild, getNextSibling, getPreviousSibling, getChild, getChildElement, getSiblingElement, getAncestorElement, getDescendantElement
RCODE getNextSibling(
IF_Db * pDb,
IF_DOMNode ** ppNextSibling);
Get the node's next sibling node, if any.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
IF_DOMNode ** ppNextSibling A pointer to the next sibling node is returned. Note that if *ppNextSibling is currently pointing to another node, it will be released before returning the next sibling node.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have already retrieved pNode, and we simply want to move to its next sibling node.
rc = pNode->getNextSibling( pDb, &pNode);
See Also: IF_Db::getNode, getDocumentNode, getNextDocument, getPreviousDocument, getParentNode, getFirstChild, getLastChild, getPreviousSibling, getChild, getChildElement, getSiblingElement, getAncestorElement, getDescendantElement
RCODE getPreviousSibling(
IF_Db * pDb,
IF_DOMNode ** ppPrevSibling);
Get the node's previous sibling node, if any.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
IF_DOMNode ** ppPrevSibling A pointer to the previous sibling node is returned. Note that if *ppPrevSibling is currently pointing to another node, it will be released before returning the previous sibling node.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have already retrieved pNode, and we simply want to move to its previous sibling node.
rc = pNode->getPreviousSibling( pDb, &pNode);
See Also: IF_Db::getNode, getDocumentNode, getNextDocument, getPreviousDocument, getParentNode, getFirstChild, getLastChild, getNextSibling, getChild, getChildElement, getSiblingElement, getAncestorElement, getDescendantElement
RCODE getChild(
IF_Db * pDb,
eDomNodeType
eNodeType,
IF_DOMNode ** ppChild);
Get the first child of the node whose type is eNodeType.
Parameters In:
IF_Db * pDb Pointer to database object. eDomNodeType eNodeType The type of child node to retrieve (return).
Parameters Out:
IF_DOMNode ** ppChild A pointer to the child node is returned. Note that if *ppChild is currently pointing to another node, it will be released before returning the child node.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have already retrieved pNode, and we simply want to move to pNode's first child node that is a data node.
rc = pNode->getChild( pDb, DATA_NODE, &pNode);
See Also: IF_Db::getNode, getDocumentNode, getNextDocument, getPreviousDocument, getParentNode, getFirstChild, getLastChild, getNextSibling, getPreviousSibling, getChildElement, getSiblingElement, getAncestorElement, getDescendantElement
RCODE getChildElement(
IF_Db * pDb,
FLMUINT
uiElementNameId,
IF_DOMNode ** ppChild);
This is a method to get the first child of the node whose type is ELEMENT_NODE and whose name id is uiElementNameId.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiElementNameId The element name id to match when searching for an element child node.
Parameters Out:
IF_DOMNode ** ppChild A pointer to the child node is returned. Note that if *ppChild is currently pointing to another node, it will be released before returning the child node.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have already retrieved pNode, and we simply want to move to pNode's first child element node whose
// element name id is 27.
rc = pNode->getChildElement( pDb, 27, &pNode);
See Also: IF_Db::getNode, getDocumentNode, getNextDocument, getPreviousDocument, getParentNode, getFirstChild, getLastChild, getNextSibling, getPreviousSibling, getChild, getSiblingElement, getAncestorElement, getDescendantElement
RCODE getSiblingElement(
IF_Db * pDb,
FLMUINT
uiElementNameId,
FLMBOOL
bNext,
IF_DOMNode ** ppSibling);
This is a method to get the next or previous sibling of the node whose type is ELEMENT_NODE and whose name id is uiElementNameId.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiElementNameId The name id to match when searching for an element sibling node. FLMBOOL bNext If bNext is TRUE, a next sibling will be returned. Otherwise, a previous sibling will be returned.
Parameters Out:
IF_DOMNode ** ppSibling A pointer to the previous or next sibling node is returned. Note that if *ppSibling is currently pointing to another node, it will be released before returning the sibling node.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have already retrieved pNode, and we simply want to move to a previous element sibling node whose
// element name id is 28.
rc = pNode->getSiblingElement( pDb, 28, FALSE, &pNode);
See Also: IF_Db::getNode, getDocumentNode, getNextDocument, getPreviousDocument, getParentNode, getFirstChild, getLastChild, getNextSibling, getPreviousSibling, getChild, getChildElement, getAncestorElement, getDescendantElement
RCODE getAncestorElement(
IF_Db * pDb,
FLMUINT uiElementNameId,
IF_DOMNode ** ppAncestor);
Get the node's ancestor element, if any.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiElementNameId Name id for ancestor element to be returned.
Parameters Out:
IF_DOMNode ** ppAncestor A pointer to the ancestor node, if found, is returned. Note that if *ppAncestor is currently pointing to another node, it will be released before returning the ancestor node.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have already retrieved pNode, and we simply want to move to pNode's ancestor element node whose name
// id is 22.
rc = pNode->getAncestorElement( pDb, 22, &pNode);
See Also: IF_Db::getNode, getDocumentNode, getNextDocument, getPreviousDocument, getParentNode, getFirstChild, getLastChild, getNextSibling, getPreviousSibling, getChild, getChildElement, getSiblingElement, getDescendantElement
RCODE getDescendantElement(
IF_Db * pDb,
FLMUINT uiElementNameId,
IF_DOMNode ** ppDescendant);
Get the node's descendant element, if any.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiElementNameId Name id for descendant element to be returned.
Parameters Out:
IF_DOMNode ** ppDescendant A pointer to the descendant node, if found, is returned. Note that if *ppDescendant is currently pointing to another node, it will be released before returning the descendant node.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have already retrieved pNode, and we simply want to move to pNode's descendant element node whose name
// id is 23.
rc = pNode->getDescendantElement( pDb, 23, &pNode);
See Also: IF_Db::getNode, getDocumentNode, getNextDocument, getPreviousDocument, getParentNode, getFirstChild, getLastChild, getNextSibling, getPreviousSibling, getChild, getChildElement, getSiblingElement, getAncestorElement
RCODE insertBefore(
IF_Db * pDb,
IF_DOMNode * pNewChild,
IF_DOMNode * pRefChild);
Insert a new node as a child of this node.
Parameters In:
IF_Db * pDb Pointer to database object. IF_DOMNode * pNewChild A pointer to the node that is to be inserted as a child node. IF_DOMNode * pRefChild A pointer to an existing child node. The new node will be linked ahead of this one. If this parameter is NULL, the new child node will be linked as the last child.
Parameters Out: none.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
IF_DOMNode * pFirstChild = NULL;
IF_DOMNode * pLastChild = NULL;
// Assume that we have already retrieved pNode. The code below will move it's last child to be the first child
if (RC_BAD( rc = pNode->getFirstChild( pDb, &pFirstChild)))
{
goto Exit;
}
if (RC_BAD( rc = pNode->getLastChild( pDb, &pLastChild)))
{
goto Exit;
}
// Move last child to be in front of first child - which will make it the new first child.
if (RC_BAD( rc = pNode->insertBefore( pDb, pLastChild, pFirstChild)))
{
goto Exit;
}
See Also: createNode
RCODE getPrefix(
IF_Db * pDb,
FLMUNICODE * puzPrefixBuffer,
FLMUINT uiBufferSize,
FLMUINT * puiCharsReturned);
Get the node's prefix as a unicode string.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiBufferSize The size of the buffer puzPrefixBuffer in bytes. The buffer size should allow for a null character terminator.
Parameters Out:
FLMUNICODE * puzPrefixBuffer A pointer to a unicode buffer where the prefix will be returned. FLMUINT * puiCharsReturned The number of unicode characters returned - does not count null terminator.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUNICODE uzPrefixBuffer [100];
FLMUINT uiNumPrefixChars;
// Assume that we have already retrieved pNode. The code below will get its prefix as a unicode string.
rc = pNode->getPrefix( pDb, uzPrefixBuffer, sizeof( uzPrefixBuffer), &uiNumPrefixChars);
See Also: getPrefix(2), getPrefixId, setPrefix(1), setPrefix(2), setPrefixId, getNamespaceURI(1), getNamespaceURI(2), getLocalName(1), getLocalName(2), getQualifiedName(1), getQualifiedName(2)
RCODE getPrefix(
IF_Db * pDb,
char * pszPrefixBuffer,
FLMUINT uiBufferSize,
FLMUINT * puiCharsReturned);
Get the node's prefix as a native string.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiBufferSize The size of the buffer pszPrefixBuffer in bytes. The buffer size should allow for a null character terminator.
Parameters Out:
char * puzPrefixBuffer A pointer to a native buffer where the prefix will be returned FLMUINT * puiCharsReturned The number of native characters returned - does not count null terminator.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
char szPrefixBuffer [100];
FLMUINT uiNumPrefixChars;
// Assume that we have already retrieved pNode. The code below will get its prefix as a native string.
rc = pNode->getPrefix( pDb, szPrefixBuffer , sizeof( szPrefixBuffer ), &uiNumPrefixChars);
See Also: getPrefix(1), getPrefixId, setPrefix(1), setPrefix(2), setPrefixId, getNamespaceURI(1), getNamespaceURI(2), getLocalName(1), getLocalName(2), getQualifiedName(1), getQualifiedName(2)
RCODE getPrefixId(
IF_Db * pDb,
FLMUINT * puiPrefixId);
Get the node's prefix definition id, if any.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUINT * puiPrefixId The prefix Id.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUINT uiPrefixId;
// Assume that we have already retrieved pNode. The code below will get its prefix id.
rc = pNode->getPrefixId( pDb, &uiPrefixId);
See Also: getPrefix(1), getPrefix(2), setPrefix(1), setPrefix(2), setPrefixId, getNamespaceURI(1), getNamespaceURI(2), getLocalName(1), getLocalName(2), getQualifiedName(1), getQualifiedName(2)
RCODE setPrefix(
IF_Db * pDb,
FLMUNICODE * puzPrefix);
Set the node's prefix from a unicode string. The string will be translated to a prefix id. If a prefix definition with that name already exists in the dictionary, the id for that prefix definition will be used. Otherwise, a new prefix definition document will be created in the dictionary (see createPrefixDef(1) or createPrefixDef(2)), with a new prefix id, and that new prefix id will be assigned to this node.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUNICODE * puzPrefix A unicode string containing the prefix.
Parameters Out: none.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUNICODE * puzPrefix = {'a', 'b', 'c', 0};
// Assume that we have already retrieved pNode. The code below will set its prefix name to "abc"
rc = pNode->setPrefix( pDb, puzPrefix);
See Also: getPrefix(1), getPrefix(2), getPrefixId, setPrefix(2), setPrefixId, getNamespaceURI(1), getNamespaceURI(2), getLocalName(1), getLocalName(2), getQualifiedName(1), getQualifiedName(2), IF_Db::createPrefixDef(1), IF_Db::createPrefixDef(2)
RCODE setPrefix(
IF_Db * pDb,
char * pszPrefix);
Set the node's prefix from a native string. The string will be translated to a prefix id. If a prefix definition with that name already exists in the dictionary, the id for that prefix definition will be used. Otherwise, a new prefix definition document will be created in the dictionary (see createPrefixDef(1) or createPrefixDef(2)), with a new prefix id, and that new prefix id will be assigned to this node.
Parameters In:
IF_Db * pDb Pointer to database object. char * pszPrefix A native string containing the prefix.
Parameters Out: none.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have already retrieved pNode. The code below will set its prefix name to "abc"
rc = pNode->setPrefix( pDb, "abc");
See Also: getPrefix(1), getPrefix(2), getPrefixId, setPrefix(1), setPrefixId, getNamespaceURI(1), getNamespaceURI(2), getLocalName(1), getLocalName(2), getQualifiedName(1), getQualifiedName(2), IF_Db::createPrefixDef(1), IF_Db::createPrefixDef(2)
RCODE setPrefixId(
IF_Db * pDb,
FLMUINT uiPrefixId);
Set the node's prefix id. The prefix id must be a valid prefix id that has already been defined in the dictionary (see createPrefixDef(1) or createPrefixDef(2)).
Parameters In:
IF_Db * pDb Pointer to database object. FLMUINT uiPrefixId The prefix id of a prefix definition document that has already been defined in the dictionary.
Parameters Out: none.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
// Assume that we have already retrieved pNode. The code below will set its prefix id to 27.
rc = pNode->setPrefixId( pDb, 27);
See Also: getPrefix(1), getPrefix(2), getPrefixId, setPrefix(1), setPrefix(2), getNamespaceURI(1), getNamespaceURI(2), getLocalName(1), getLocalName(2), getQualifiedName(1), getQualifiedName(2), IF_Db::createPrefixDef(1), IF_Db::createPrefixDef(2)
RCODE getNamespaceURI(
IF_Db * pDb,
FLMUNICODE * puzNamespaceURIBuffer,
FLMUINT uiBufferSize,
FLMUINT * puiCharsReturned )
Get the DOM node's namespace URI as a Unicode string.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUNICODE * puzNamespaceURIBuffer A pointer to a unicode buffer to hold the namespace URI. FLMUINT uiBufferSize The actual buffer size in bytes. The buffer size should allow for a null character terminator.
Parameters Out:
FLMUINT * puiCharsReturned The number of unicode characters returned - does not count null terminator..
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUNICODE uzNamespaceBuffer [100];
FLMUINT uiNumNamespaceChars;
// Assume that we have already retrieved pNode. The code below will get its namespace URI as a unicode string.
rc = pNode->getNamespaceURI( pDb, uzNamespaceBuffer , sizeof( uzNamespaceBuffer ), &uiNumNamespaceChars);
See Also: getPrefix(1), getPrefix(2), getPrefixId, setPrefix(1), setPrefix(2), setPrefixId, getNamespaceURI(2), getLocalName(1), getLocalName(2), getQualifiedName(1), getQualifiedName(2)
RCODE getNamespaceURI(
IF_Db * pDb,
char * pszNamespaceURIBuffer,
FLMUINT uiBufferSize,
FLMUINT * puiCharsReturned);
Get the node's namespace URI as a native string.
Parameters In:
IF_Db * pDb Pointer to database object. char * pszNamespaceURIBuffer A pointer to a buffer to hold the namespace URI. FLMUINT uiBufSize The actual buffer size in bytes. The buffer size should allow for a null character terminator.
Parameters Out:
FLMUINT * puiCharsReturned The number of native characters returned - does not count null terminator..
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
char szNamespaceBuffer [100];
FLMUINT uiNumNamespaceChars;
// Assume that we have already retrieved pNode. The code below will get its namespace URI as a native string.
rc = pNode->getNamespaceURI( pDb, szNamespaceBuffer , sizeof( szNamespaceBuffer ), &uiNumNamespaceChars);
See Also: getPrefix(1), getPrefix(2), getPrefixId, setPrefix(1), setPrefix(2), setPrefixId, getNamespaceURI(1), getLocalName(1), getLocalName(2), getQualifiedName(1), getQualifiedName(2)
RCODE getLocalName(
IF_Db * pDb,
FLMUNICODE * puzLocalNameBuffer,
FLMUINT uiBufferSize,
FLMUINT * puiCharsReturned);
Get the node's local name as a unicode string. The local name is the un-prefixed name. For example, if the qualified name were xs:element, the local name would be the qualified name without the prefix, or simply element.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUNICODE * puzLocalNameBuffer A pointer to a unicode buffer to hold the local name. FLMUINT uiBufferSize The actual buffer size in bytes. The buffer size should allow for a null character terminator.
Parameters Out:
FLMUINT * puiCharsReturned The number of unicode characters returned - does not count null terminator..
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUNICODE uzLocalNameBuffer [100];
FLMUINT uiNumLocalNameChars;
// Assume that we have already retrieved pNode. The code below will get its local name as a unicode string.
rc = pNode->getLocalName( pDb, uzLocalNameBuffer , sizeof( uzLocalNameBuffer ), &uiNumLocalNameChars);
See Also: getPrefix(1), getPrefix(2), getPrefixId, setPrefix(1), setPrefix(2), setPrefixId, getNamespaceURI(1), getNamespaceURI(2), getLocalName(2), getQualifiedName(1), getQualifiedName(2)
RCODE getLocalName(
IF_Db * pDb,
char * pszLocalNameBuffer,
FLMUINT uiBufferSize,
FLMUINT * puiCharsReturned )
Get the node's local name as a native string. The local name is the un-prefixed name. For example, if the qualified name were xs:element, the local name would be the qualified name without the prefix, or simply element.
Parameters In:
IF_Db * pDb Pointer to database object. char * pszLocalNameBuffer A pointer to a native buffer to hold the local name. FLMUINT uiBufferSize The actual buffer size in bytes. The buffer size should allow for a null character terminator.
Parameters Out:
FLMUINT * puiCharsReturned The number of native characters returned - does not count null terminator..
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
char szLocalNameBuffer [100];
FLMUINT uiNumLocalNameChars;
// Assume that we have already retrieved pNode. The code below will get its local name as a native string.
rc = pNode->getLocalName( pDb, szLocalNameBuffer , sizeof( szLocalNameBuffer ), &uiNumLocalNameChars);
See Also: getPrefix(1), getPrefix(2), getPrefixId, setPrefix(1), setPrefix(2), setPrefixId, getNamespaceURI(1), getNamespaceURI(2), getLocalName(1), getQualifiedName(1), getQualifiedName(2)
RCODE getQualifiedName(
IF_Db * pDb,
FLMUNICODE * puzQualifiedNameBuffer,
FLMUINT uiBufferSize,
FLMUINT * puiCharsReturned);
Get the node's qualified name as a unicode string. The qualified name includes the prefix and the local name, separated by a colon. For example, if an element's name is element, and its prefix is xs, the qualified name would be xs:element.
Parameters In:
IF_Db * pDb Pointer to database object. FLMUNICODE * puzQualifiedNameBuffer A pointer to a unicode buffer to hold the local name. FLMUINT uiBufferSize The actual buffer size in bytes. The buffer size should allow for a null character terminator.
Parameters Out:
FLMUINT * puiCharsReturned The number of unicode characters returned - does not count null terminator..
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUNICODE uzQualifiedNameBuffer [100];
FLMUINT uiNumQualifiedNameChars;
// Assume that we have already retrieved pNode. The code below will get its qualified name as a unicode string.
rc = pNode->getQualifiedName( pDb, uzQualifiedNameBuffer , sizeof( uzQualifiedNameBuffer ), &uiNumQualifiedNameChars);
See Also: getPrefix(1), getPrefix(2), getPrefixId, setPrefix(1), setPrefix(2), setPrefixId, getNamespaceURI(1), getNamespaceURI(2), getLocalName(1), getLocalName(2), getQualifiedName(2)
RCODE getQualifiedName(
IF_Db * pDb,
char * pszQualifiedNameBuffer,
FLMUINT uiBufferSize,
FLMUINT * puiCharsReturned);
Get the node's qualified name as a native string. The qualified name includes the prefix and the local name, separated by a colon. For example, if an element's name is element, and its prefix is xs, the qualified name would be xs:element.
Parameters In:
IF_Db * pDb Pointer to database object. char * puzQualifiedNameBuffer A pointer to a native buffer to hold the qualified name. FLMUINT uiBufferSize The actual buffer size in bytes. The buffer size should allow for a null character terminator.
Parameters Out:
FLMUINT * puiCharsReturned The number of native characters returned - does not count null terminator..
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
char szQualifiedNameBuffer [100];
FLMUINT uiNumQualifiedNameChars;
// Assume that we have already retrieved pNode. The code below will get its qualified name as a native string.
rc = pNode->getQualifiedName( pDb, szQualifiedNameBuffer , sizeof( szQualifiedNameBuffer ), &uiNumQualifiedNameChars);
See Also: getPrefix(1), getPrefix(2), getPrefixId, setPrefix(1), setPrefix(2), setPrefixId, getNamespaceURI(1), getNamespaceURI(2), getLocalName(1), getLocalName(2), getQualifiedName(1)
RCODE getCollection(
IF_Db * pDb,
FLMUINT * puiCollection);
Get the collection number this node belongs to.
Parameters In: none.
Parameters Out:
FLMUINT * puiCollection The collection number.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUINT uiCollection;
// Assume that we have already retrieved pNode. The code below will get the collection it belongs to.
rc = pNode->getCollection( pDb, &uiCollection);
See Also:
RCODE createAnnotation(
IF_Db * pDb,
IF_DOMNode
** ppAnnotation,
FLMUINT64
* pui64NodeId = NULL);
This method creates an annotation for the node. Every node type (except annotation nodes) may have an annotation node. This makes it easy to add text based information to any node. Annotation nodes cannot have children or sibling nodes.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
IF_DOMNode ** ppAnnotation A pointer to the created annotation node is returned here. Note that if *ppAnnotation is currently pointing to another node, it will be released before returning the new annotation node. FLMUINT64 * pui64NodeId The new annotation node's node id.
Example Code:
IF_DOMNode * pNode;
IF_DOMNode * pAnnotation = NULL;
IF_Db * pDb;
// Assume that we have already retrieved pNode. The code below will create an annotation node for pNode.
rc = pNode->createAnnotation( pDb, &pAnnotation, NULL);
See Also: getAnnotation, getAnnotationId, hasAnnotation
RCODE getAnnotation(
IF_Db * pDb,
IF_DOMNode ** ppAnnotation);
Retrieve node's annotation node, if any.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
IF_DOMNode ** ppAnnotation A pointer to the node's annotation node is returned here. Note that if *ppAnnotation is currently pointing to another node, it will be released before returning the annotation node.
Example Code:
IF_DOMNode * pNode;
IF_DOMNode * pAnnotation = NULL;
IF_Db * pDb;
// Assume that we have already retrieved pNode. The code below will retrieve its annotation node, if any.
rc = pNode->getAnnotation( pDb, &pAnnotation);
See Also: createAnnotation, getAnnotationId, hasAnnotation
RCODE getAnnotationId(
IF_Db * pDb,
FLMUINT64 ** pui64AnnotationId);
Retrieve node's annotation node id, if any.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMUINT64 * pui64AnnotationId Node's annotation node id is returned here.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMUINT64 ui64AnnotationId;
// Assume that we have already retrieved pNode. The code below will retrieve its annotation node id, if any.
rc = pNode->getAnnotationId( pDb, &ui64AnnotationId);
See Also: createAnnotation, getAnnotation, hasAnnotation
RCODE hasAnnotation(
IF_Db * pDb,
FLMBOOL * pbHasAnnotation);
Determine if a node has an annotation.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMBOOL * pbHasAnnotation A value TRUE means that the node has an annotation, FALSE means it does not.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMBOOL bHasAnnotation;
// Assume that we have already retrieved pNode. The code below will determine if the node has an annotation.
rc = pNode->hasAnnotation( pDb, &bHasAnnotation);
See Also: createAnnotation, getAnnotation, getAnnotationId
RCODE getIStream(
IF_Db * pDb,
IF_PosIStream
** ppIStream,
FLMUINT *
puiDataType = NULL,
FLMUINT * puiDataLength = NULL);
This method returns an input stream object that can be used to read binary data out of the node. This is useful for streaming out large binary values. This method should only be used for binary data. Use getTextIStream for string data.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
IF_PosIStream ** ppIStream The returned input stream object. FLMUINT * puiDataType The data type of the input stream. FLMUINT * puiDataLength The total data length of the input stream.
Example Code:
.
.
.
IF_PosIStream * pIStream;
if (uiDataType == XFLM_TEXT_TYPE)
{
if (RC_BAD( rc = pNode->getTextIStream( this, &pIStream, &uiNumChars)))
{
goto Exit;
}
}
else
{
if (RC_BAD( rc = pNode->getIStream( this, &pIStream, NULL)))
{
goto Exit;
}
uiNumChars = pIStream->remainingSize();
}
..
.
See Also: getTextIStream
RCODE getTextIStream(
IF_Db * pDb,
IF_PosIStream
** ppIStream,
FLMUINT *
puiNumChars);
This method returns an input stream object that can be used to read string data out of the node. This is useful for streaming out large string values. When reading from the returned input stream, the data will come back as UTF8. This method should only be used for string data. Use getIStream for binary data.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
IF_PosIStream ** ppIStream The input stream object. FLMUINT * puiNumChars Total number of characters in the input stream.
Example Code: See example code for getIStream.
See Also: getIStream
RCODE compareNode(
IF_DOMNode * pNode,
IF_Db *
pDb1,
IF_Db *
pDb2,
char * pszErrBuff,
FLMUINT
uiErrBuffLen);
This is a method to compare this node with the passed in node (pNode). The nodes are expected to be from different XFLAIM databases. This method is useful when comparing databases after a restore operation.
Parameters In:
IF_DOMNode * pNode The node that is to be compared against the current node. IF_Db * pDb1 The pointer to database object to which the current node belongs. IF_Db * pDb2 The pointer to database object to which the pNode belongs. FLMUINT uiErrBuffLen The size of pszErrBuff.
Parameters Out:
char * pszErrBuff A buffer to hold a diagnostic error message should an error occur.
Example Code:
IF_DOMNode * pNode1;
IF_Db * pDb1;
IF_DOMNode * pNode2;
IF_Db * pDb2;
char szErrBuf [200];
// Assume that pNode1 was retrieved from pDb1 and pNode2 was retrieved from pDb2
rc = pNode1->compareNode( pNode2, pDb1, pDb2, szErrBuf, sizeof( szErrBuf));
See Also:
RCODE isDataLocalToNode(
IF_Db * pDb,
FLMBOOL * pbDataLocal);
Determine if the node's data is cached with the node object, or if we would have to go to disk to get it.
Parameters In:
IF_Db * pDb Pointer to database object.
Parameters Out:
FLMBOOL * pbDataLocal A value TRUE means that the node's data is with the object and does not have to be retrieved from disk.
Example Code:
IF_DOMNode * pNode;
IF_Db * pDb;
FLMBOOL bDataLocal;
// Assume that we have already retrieved pNode. The code below will determine if the node's data is cached with it.
rc = pNode->isDataLocalToNode( pDb, &bDataLocal);
See Also: