XBinder XML Runtime  XBinder Version 3.0.x
Functions
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

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

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

◆ rtXmlCppEncAnyAttr()

EXTERNXML 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
pctxtPointer to context block structure.
pAnyAttrListList of name/value pair objects.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlCppEncAnyTypeValue()

EXTERNXML 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
pctxtPointer to context block structure.
pvalueValue 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.

◆ rtXmlCppEncStartElement()

EXTERNXML 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
pctxtPointer to context block structure.
elemNameXML element name.
pNSXML namespace information (prefix and URI). If the prefix is NULL, this method will search the context's namespace stack for a prefix to use.
pNSAttrsList of namespace attributes to be added to element.
terminateAdd closing '>' character.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlEncAny()

EXTERNXML int rtXmlEncAny ( OSCTXT *  pctxt,
OSRTXMLString *  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
pctxtPointer to context block structure.
pxmlstrValue to be encoded. This is a string containing the fully-encoded XML text to be copied to the output stream.
elemNameXML element name. A name must be provided. If an empty string is passed (""), no element tag is added to the encoded value.
pNSPointer to namespace structure.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlEncString()

EXTERNXML int rtXmlEncString ( OSCTXT *  pctxt,
OSRTXMLString *  pxmlstr,
const OSUTF8CHAR *  elemName,
OSXMLNamespace *  pNS 
)

This function encodes a variable of the XSD string type.

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