Define coder function for binary data.
More...
#include <CoconutXML/CoconutXML.h>
#include <libxml/tree.h>
Go to the source code of this file.
Functions |
xmlNodePtr | CNEncodeBinaryData (const xmlChar *elmname, size_t srcsize, const void *srcdata) |
| Encode binary data into XML node.
|
CNBoolean | CNDecodeBinaryData (struct CNBuffer *dst, xmlNodePtr src, const xmlChar *elmname, struct CNXMLDecodeError *error) |
| Decode XML node and get binary data.
|
Detailed Description
Define coder function for binary data.
- Copyright
- Copyright (C) 2012 Steel Wheels Project
Function Documentation
xmlNodePtr CNEncodeBinaryData |
( |
const xmlChar * |
elmname, |
|
|
size_t |
srcsize, |
|
|
const void * |
srcdata |
|
) |
| |
Encode binary data into XML node.
- Returns:
- Encoded node
- Parameters:
-
elmname | Element name for the XML node |
srcsize | Size of source data |
srcdata | Source data |
- Note
- Base64 is used to encode binary data
- Note
- Use CNDecodeBinaryData() function as decoder
CNBoolean CNDecodeBinaryData |
( |
struct CNBuffer * |
dst, |
|
|
xmlNodePtr |
src, |
|
|
const xmlChar * |
elmname, |
|
|
struct CNXMLDecodeError * |
error |
|
) |
| |
Decode XML node and get binary data.
- Return values:
-
TRUE | Decode succeeded |
FALSE | Decode failed |
- Parameters:
-
dst | Destination buffer to store decode result |
src | Source XML node |
elmname | Element name for the XML node |
error | Error information. This is set when the returned value is CNFalse. |