SECXMLArchive::Serialize

Stores or Loads an element with the specified tag name under the current Parent Element in the XML DOM. Calls the corresponding Read or Write based on the context in which the archive was created.

Defined in: xmlarch.h

Syntax

BOOL Serialize(LPCTSTR tagName, BYTE& by, BOOL bAssertOnFailure = FALSE)

BOOL Serialize(LPCTSTR tagName, WORD& w, BOOL bAssertOnFailure = FALSE)

BOOL Serialize(LPCTSTR tagName, DWORD& dw, BOOL bAssertOnFailure = FALSE)

BOOL Serialize(LPCTSTR tagName, LONG& l, BOOL bAssertOnFailure = FALSE)

BOOL Serialize(LPCTSTR tagName, float& f, BOOL bAssertOnFailure = FALSE)

BOOL Serialize(LPCTSTR tagName, double& d, BOOL bAssertOnFailure = FALSE)

BOOL Serialize(LPCTSTR tagName, int& i, BOOL bAssertOnFailure = FALSE)

BOOL Serialize(LPCTSTR tagName, short& w, BOOL bAssertOnFailure = FALSE)

BOOL Serialize(LPCTSTR tagName, char& ch, BOOL bAssertOnFailure = FALSE)

BOOL Serialize(LPCTSTR tagName, unsigned& u, BOOL bAssertOnFailure = FALSE)

BOOL Serialize(LPCTSTR tagName, LPTSTR& lpBuff, UINT& nLen, long type = 3/*NODE_TEXT*/, BOOL bAssertOnFailure = FALSE, BOOL bTruncateOnOverflow = FALSE)

BOOL Serialize(LPCTSTR tagName, void*& lpBuf, UINT nLen, int encodeType = SEC_BASE64, BOOL bAssertOnFailure = FALSE)

BOOL Serialize(LPCTSTR contextTagName, IXMLSerialize* pFormatter, BOOL bAssertOnFailure = FALSE)

BOOL Serialize(LPCTSTR tagName, CString& string, long type = 3 /*NODE_TEXT*/, BOOL bAssertOnFailure = FALSE)

BOOL Serialize(LPCTSTR tagName, CString*& string, long type = 3 /*NODE_TEXT*/, BOOL bAssertOnFailure = FALSE)

Return Value

TRUE if tag found, FALSE otherwise. Useful only while loading.

Parameters

tagName

Specifies the tag name of the element to be stored or retrieved.

by

An in parameter while storing and out parameter while loading.

w

An in parameter while storing and out parameter while loading.

dw

An in parameter while storing and out parameter while loading.

l

An in parameter while storing and out parameter while loading.

f

An in parameter while storing and out parameter while loading.

d

An in parameter while storing and out parameter while loading.

i

An in parameter while storing and out parameter while loading.

sh

An in parameter while storing and out parameter while loading.

ch

An in parameter while storing and out parameter while loading.

ui

An in parameter while storing and out parameter while loading.

lpBuff

An in parameter while storing and out parameter while loading.

nLen

Specifies the size of the buffer.

lpBuf

An in parameter while storing and out parameter while loading.

encodeType

Type specifies the encoding type to use - base64 or printed quotable.

str

An in parameter while storing and out parameter while loading.

pStr

An in parameter while storing and out parameter while loading.

pFormatter

A reference to a formatter which has XMLSerialize overriden and whose serialization calls are executed in the context of the newly loaded element.

type

Type specifies whether to store it as string value (NODE_TEXT) the default or NODE_CDATA_SECTION

type

Type specifies whether to store it as string value (NODE_TEXT) the default or NODE_CDATA_SECTION

bAssertOnFailure

Flag indicated whether function should ASSERT if tag not found.

bTruncateOnOverflow

Specifies whether the retrieved string should be limited to the size specified. If FALSE and if the supplied buffer is not big enough, it is deleted and a new buffer created with the necessary size and str is bound to that buffer.

See Also

SECXMLArchive