rtXmlCppEncFuncs.h File Reference

XML low-level C++ encode functions. More...

#include "rtxmlsrc/osrtxml.h"
#include "rtxsrc/rtxCppDList.h"

Go to the source code of this file.

Functions

int rtXmlCppEncAnyAttr (OSCTXT *pctxt, OSRTObjListClass *pAnyAttrList)
 This function encodes a variable of the XSD any attribute type.
int rtXmlEncAny (OSCTXT *pctxt, OSXMLStringClass *pxmlstr, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS)
 This function encodes a variable of the XSD any type.
int rtXmlCppEncAnyTypeValue (OSCTXT *pctxt, OSXSDAnyTypeClass *pvalue)
 This function encodes a variable of the XSD anyType type.
int rtXmlCppEncStartElement (OSCTXT *pctxt, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS, OSRTDListClass *pNSAttrs, OSBOOL terminate)
 This function encodes a start element tag value (<elemName>).
int rtXmlEncString (OSCTXT *pctxt, OSXMLStringClass *pxmlstr, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS)
 This function encodes a variable of the XSD string type.

Detailed Description

XML low-level C++ encode functions.

These are overloaded versions of C XML encode functions for use with C++.

Definition in file rtXmlCppEncFuncs.h.


Function Documentation

int rtXmlCppEncAnyAttr ( OSCTXT *  pctxt,
OSRTObjListClass *  pAnyAttrList 
)

This function encodes a variable of the XSD any attribute type.

This is expressed as list of name/value pairs.

Parameters:
pctxt Pointer to context block structure.
pAnyAttrList List of name/value pair objects.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
int rtXmlCppEncAnyTypeValue ( OSCTXT *  pctxt,
OSXSDAnyTypeClass *  pvalue 
)

This function encodes a variable of the XSD anyType type.

This is considered to be a fully-wrapped element of anyType type (for example: * <myType>myData</myType>)

Parameters:
pctxt Pointer to context block structure.
pvalue Value to be encoded. This is a pointer to a OSXSDAnyTypeClass containing the fully-encoded XML text to be copied to the output stream.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
int rtXmlCppEncStartElement ( OSCTXT *  pctxt,
const OSUTF8CHAR *  elemName,
OSXMLNamespace *  pNS,
OSRTDListClass *  pNSAttrs,
OSBOOL  terminate 
)

This function encodes a start element tag value (<elemName>).

This function is for use with C++ which uses OSRTDListClass instead of OSRTList (as in the C version of this function).

Parameters:
pctxt Pointer to context block structure.
elemName XML element name.
pNS XML namespace information (prefix and URI). If the prefix is NULL, this method will search the context's namespace stack for a prefix to use.
pNSAttrs List of namespace attributes to be added to element.
terminate Add closing '>' character.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
int rtXmlEncAny ( OSCTXT *  pctxt,
OSXMLStringClass *  pxmlstr,
const OSUTF8CHAR *  elemName,
OSXMLNamespace *  pNS 
)

This function encodes a variable of the XSD any type.

This is considered to be a fully-wrapped element of any type (for example: <myType>myData</myType>)

Parameters:
pctxt Pointer to context block structure.
pxmlstr Value to be encoded. This is a string containing the fully-encoded XML text to be copied to the output stream.
elemName XML element name. A name must be provided. If an empty string is passed (""), no element tag is added to the encoded value.
pNS Pointer to namespace structure.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
int rtXmlEncString ( OSCTXT *  pctxt,
OSXMLStringClass *  pxmlstr,
const OSUTF8CHAR *  elemName,
OSXMLNamespace *  pNS 
)

This function encodes a variable of the XSD string type.

Parameters:
pctxt Pointer to context block structure.
pxmlstr XML string value to be encoded.
elemName XML element name. A name must be provided. If an empty string is passed (""), no element tag is added to the encoded value.
pNS Pointer to namespace structure.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.