Coconut XML Framework  beta
Functions
CNXMLPropUtil.h File Reference

Define functions to operate property of XML node. More...

#include "CNXMLForwarders.h"
#include "CNXMLDecodeError.h"
#include <Coconut/Coconut.h>
#include <libxml/tree.h>
#include <stdint.h>

Go to the source code of this file.

Functions

void CNXMLSetUInt32Prop (xmlNodePtr dst, const xmlChar *attrname, uint32_t attrval)
 Set attribute with the uint32_t value.
CNBoolean CNXMLUInt32Prop (uint32_t *dst, xmlNodePtr src, const xmlChar *attrname, struct CNXMLDecodeError *error)
 Decode the attribute value and get uint32 value.
void CNXMLSetUInt64Prop (xmlNodePtr dst, const xmlChar *attrname, uint64_t attrval)
 Set attribute with the uint64_t value.
CNBoolean CNXMLUInt64Prop (uint64_t *dst, xmlNodePtr src, const xmlChar *attrname, struct CNXMLDecodeError *error)
 Decode the attribute value and get uint64 value.
void CNXMLSetDoubleProp (xmlNodePtr dst, const xmlChar *attrname, double attrval)
 Set attribute with the float value.
CNBoolean CNXMLDoubleProp (double *dst, xmlNodePtr src, const xmlChar *attrname, struct CNXMLDecodeError *error)
 Decode the attribute value and get float value.
void CNXMLSetStringProp (xmlNodePtr dst, const xmlChar *attrname, const struct CNString *attrval)
 Set attribute with string value.
static void CNXMLSetCStringProp (xmlNodePtr dst, const xmlChar *attrname, const xmlChar *attrval)
 Set attribute with string value.
CNBoolean CNXMLCStringProp (const xmlChar **dst, xmlNodePtr src, const xmlChar *attrname, struct CNXMLDecodeError *error)
 Decode the attribute value and get string value.

Detailed Description

Define functions to operate property of XML node.

Copyright
Copyright (C) 2012 Steel Wheels Project

Function Documentation

void CNXMLSetUInt32Prop ( xmlNodePtr  dst,
const xmlChar *  attrname,
uint32_t  attrval 
)

Set attribute with the uint32_t value.

Parameters:
dstDestination node
attrnameAttribute name
attrvalAttribute value
CNBoolean CNXMLUInt32Prop ( uint32_t *  dst,
xmlNodePtr  src,
const xmlChar *  attrname,
struct CNXMLDecodeError error 
)

Decode the attribute value and get uint32 value.

Return values:
TRUEDecode successed
FALSEDecode failed
Parameters:
dstDestination value to store decode result
srcSource XML node
attrnameName of target attribute
errorError information.
void CNXMLSetUInt64Prop ( xmlNodePtr  dst,
const xmlChar *  attrname,
uint64_t  attrval 
)

Set attribute with the uint64_t value.

Parameters:
dstDestination node
attrnameAttribute name
attrvalAttribute value
CNBoolean CNXMLUInt64Prop ( uint64_t *  dst,
xmlNodePtr  src,
const xmlChar *  attrname,
struct CNXMLDecodeError error 
)

Decode the attribute value and get uint64 value.

Return values:
TRUEDecode successed
FALSEDecode failed
Parameters:
dstDestination value to store decode result
srcSource XML node
attrnameName of target attribute
errorError information.
void CNXMLSetDoubleProp ( xmlNodePtr  dst,
const xmlChar *  attrname,
double  attrval 
)

Set attribute with the float value.

Parameters:
dstDestination node
attrnameAttribute name
attrvalAttribute value
CNBoolean CNXMLDoubleProp ( double *  dst,
xmlNodePtr  src,
const xmlChar *  attrname,
struct CNXMLDecodeError error 
)

Decode the attribute value and get float value.

Return values:
TRUEDecode successed
FALSEDecode failed
Parameters:
dstDestination value to store decode result
srcSource XML node
attrnameName of target attribute
errorError information.
void CNXMLSetStringProp ( xmlNodePtr  dst,
const xmlChar *  attrname,
const struct CNString *  attrval 
)

Set attribute with string value.

Parameters:
dstDestination node
attrnameAttribute name
attrvalAttribute value
static void CNXMLSetCStringProp ( xmlNodePtr  dst,
const xmlChar *  attrname,
const xmlChar *  attrval 
) [inline, static]

Set attribute with string value.

Parameters:
dstDestination node
attrnameAttribute name
attrvalAttribute value
CNBoolean CNXMLCStringProp ( const xmlChar **  dst,
xmlNodePtr  src,
const xmlChar *  attrname,
struct CNXMLDecodeError error 
)

Decode the attribute value and get string value.

Return values:
TRUEDecode successed
FALSEDecode failed
Parameters:
dstDestination value to store decode result
srcSource XML node
attrnameName of target attribute
errorError information.