Coconut XML Framework  beta
Functions
CNXMLNodeUtil.h File Reference

Define functions to operate XML node. More...

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

Go to the source code of this file.

Functions

static CNBoolean CNXMLIsEmptyTextNode (xmlNodePtr node)
 Check the text node contains only spaces.
CNBoolean CNXMLCheckElementName (xmlNodePtr node, const xmlChar *name, struct CNXMLDecodeError *error)
 Check the XML node is element name and has same name.
xmlNodePtr CNXMLSearchChildElementNode (xmlNodePtr node, const xmlChar *name, struct CNXMLDecodeError *error)
 Search child element node.
const xmlChar * CNXMLElementTypeToString (xmlElementType type)
 Get string to present xmlElementType.

Detailed Description

Define functions to operate XML node.

Copyright
Copyright (C) 2012 Steel Wheels Project

Function Documentation

static CNBoolean CNXMLIsEmptyTextNode ( xmlNodePtr  node) [inline, static]

Check the text node contains only spaces.

Return values:
TRUEThe node is text node and it contains only spaces
FALSEThe node is NOT test node or it contains non-space character
Parameters:
nodeSource node
CNBoolean CNXMLCheckElementName ( xmlNodePtr  node,
const xmlChar *  name,
struct CNXMLDecodeError error 
)

Check the XML node is element name and has same name.

Return values:
TRUEThe node is element node which has given name
FALSEThe node is not element or the element node does not have the given name
Parameters:
nodeSource XML node
nameName to search
errorThe error information. This is set when the returned value is FALSE.
xmlNodePtr CNXMLSearchChildElementNode ( xmlNodePtr  node,
const xmlChar *  name,
struct CNXMLDecodeError error 
)

Search child element node.

Return values:
nodeThe child node which has the given name
NULLThere are no matched node
Parameters:
nodeSource parent XML node
nameName to search
errorThe error information. This is set when the returned value is FALSE.
const xmlChar* CNXMLElementTypeToString ( xmlElementType  type)

Get string to present xmlElementType.

Returns:
String to present xmlElementType
Parameters:
typeSource element type