Main Page   Modules   Compound List   File List   Compound Members   File Members   Related Pages  

WBXML Element
[WBXML Library]


Files

file  wbxml_elt.c
 WBXML Elements.

file  wbxml_elt.h
 WBXML Elements.


Compounds

struct  WBXMLAttribute_s
 WBXML Attribute structure. More...

struct  WBXMLAttributeName_s
 WBXML Attribute Name structure. More...

struct  WBXMLTag_s
 WBXML Tag structure. More...


Typedefs

typedef enum WBXMLValueType_e WBXMLValueType
 WBXML Value Type.

typedef WBXMLTag_s WBXMLTag
 WBXML Tag structure.

typedef WBXMLAttributeName_s WBXMLAttributeName
 WBXML Attribute Name structure.

typedef WBXMLAttribute_s WBXMLAttribute
 WBXML Attribute structure.


Enumerations

enum  WBXMLValueType_e { WBXML_VALUE_TOKEN = 0, WBXML_VALUE_LITERAL }
 WBXML Value Type. More...


Functions

WBXMLTagwbxml_tag_create (WBXMLValueType type)
 Create a Tag structure.

WBXMLTagwbxml_tag_create_token (const WBXMLTagEntry *value)
 Additional function to create directly a Token Tag structure.

WBXMLTagwbxml_tag_create_literal (WB_UTINY *value)
 Additional function to create directly a Literal Tag structure.

void wbxml_tag_destroy (WBXMLTag *tag)
 Destroy a Tag structure.

WBXMLTagwbxml_tag_duplicate (WBXMLTag *tag)
 Duplicate a Tag structure.

const unsigned char * wbxml_tag_get_xml_name (WBXMLTag *tag)
 Get the XML Name of a WBXML Tag.

WBXMLAttributeNamewbxml_attribute_name_create (WBXMLValueType type)
 Create an Attribute Name structure.

WBXMLAttributeNamewbxml_attribute_name_create_token (const WBXMLAttrEntry *value)
 Additional function to create directly a Token Attribute Name structure.

WBXMLAttributeNamewbxml_attribute_name_create_literal (WB_UTINY *value)
 Additional function to create directly a Literal Attribute Name structure.

void wbxml_attribute_name_destroy (WBXMLAttributeName *name)
 Destroy an Attribute Name structure.

WBXMLAttributeNamewbxml_attribute_name_duplicate (WBXMLAttributeName *name)
 Duplicate a Attribute Name structure.

const unsigned char * wbxml_attribute_name_get_xml_name (WBXMLAttributeName *name)
 Get the XML Name of a WBXML Attribute Name.

WBXMLAttributewbxml_attribute_create (void)
 Create an Attribute structure.

void wbxml_attribute_destroy (WBXMLAttribute *attr)
 Destroy an Attribute structure.

WBXMLAttributewbxml_attribute_duplicate (WBXMLAttribute *attr)
 Duplicate an Attribute structure.

const unsigned char * wbxml_attribute_get_xml_name (WBXMLAttribute *attr)
 Get the XML Attribute Name of a WBXML Attribute.

const unsigned char * wbxml_attribute_get_xml_value (WBXMLAttribute *attr)
 Get the XML Attribute Value of a WBXML Attribute.


Typedef Documentation

typedef struct WBXMLAttribute_s WBXMLAttribute
 

WBXML Attribute structure.

Note:
The 'value' part contain the FULL attribute value For example, with the attribute: url="http://127.0.0.1/" If the 'name' part is this:
  • name->u.token->wbxmlCodePage: 0x00
  • name->u.token->wbxmlToken : 0x4b
  • name->u.token->xmlName : "url"
  • name->u.token->xmlValue: "http://"
Then, 'value' is still: "http://127.0.0.1/"

Of course (in this example) it should be better to have the wbxmlToken 0x4a ("url" / NULL). So you mustn't take into account the 'xmlValue' field for 'name' to get the Attribute Value of this Attribute.

typedef struct WBXMLAttributeName_s WBXMLAttributeName
 

WBXML Attribute Name structure.

typedef struct WBXMLTag_s WBXMLTag
 

WBXML Tag structure.

typedef enum WBXMLValueType_e WBXMLValueType
 

WBXML Value Type.

Referenced by wbxml_attribute_name_create(), and wbxml_tag_create().


Enumeration Type Documentation

enum WBXMLValueType_e
 

WBXML Value Type.

Enumeration values:
WBXML_VALUE_TOKEN  WBXML Token value
WBXML_VALUE_LITERAL  WBXML Literal value

Definition at line 49 of file wbxml_elt.h.


Function Documentation

WBXMLAttribute* wbxml_attribute_create void   
 

Create an Attribute structure.

Returns:
The newly created Attribute, or NULL if not enough memory

Definition at line 267 of file wbxml_elt.c.

References WBXMLAttribute_s::name, NULL, WBXMLAttribute_s::value, and wbxml_malloc().

void wbxml_attribute_destroy WBXMLAttribute   attr
 

Destroy an Attribute structure.

Parameters:
attr The Attribute structure to destroy

Definition at line 281 of file wbxml_elt.c.

References WBXMLAttribute_s::name, NULL, WBXMLAttribute_s::value, wbxml_attribute_name_destroy(), wbxml_buffer_destroy(), and wbxml_free().

Referenced by wbxml_tree_attribute_destroy().

WBXMLAttribute* wbxml_attribute_duplicate WBXMLAttribute   attr
 

Duplicate an Attribute structure.

Parameters:
attr The Attribute structure to duplicate
Returns:
The duplicated Attribute, or NULL if not enough memory

Definition at line 293 of file wbxml_elt.c.

References WBXMLAttribute_s::name, NULL, WBXMLAttribute_s::value, wbxml_attribute_name_duplicate(), wbxml_buffer_duplicate(), and wbxml_malloc().

const unsigned char* wbxml_attribute_get_xml_name WBXMLAttribute   attr
 

Get the XML Attribute Name of a WBXML Attribute.

Parameters:
attr The WBXML Attribute
Returns:
The XML Attribute Name, or "unknown" if not found

Definition at line 310 of file wbxml_elt.c.

References WBXMLAttribute_s::name, NULL, WB_UTINY, wbxml_attribute_name_get_xml_name(), and WBXML_ELT_UNKNOWN_NAME.

const unsigned char* wbxml_attribute_get_xml_value WBXMLAttribute   attr
 

Get the XML Attribute Value of a WBXML Attribute.

Parameters:
attr The WBXML Attribute
Returns:
The XML Attribute Value, or "" if none

Definition at line 319 of file wbxml_elt.c.

References NULL, WBXMLAttribute_s::value, WB_UTINY, wbxml_buffer_get_cstr(), and WBXML_UTINY_NULL_STRING.

WBXMLAttributeName* wbxml_attribute_name_create WBXMLValueType    type
 

Create an Attribute Name structure.

Parameters:
type WBXML Value Type
Returns:
The newly created Attribute Name, or NULL if not enough memory

Definition at line 158 of file wbxml_elt.c.

References NULL, WBXMLAttributeName_s::type, WBXMLAttributeName_s::u, wbxml_malloc(), and WBXMLValueType.

Referenced by wbxml_attribute_name_create_literal(), and wbxml_attribute_name_create_token().

WBXMLAttributeName* wbxml_attribute_name_create_literal WB_UTINY *    value
 

Additional function to create directly a Literal Attribute Name structure.

Parameters:
value The Literal value
Returns:
The newly created Attribute Name, or NULL if not enough memory

WBXMLAttributeName* wbxml_attribute_name_create_token const WBXMLAttrEntry   value
 

Additional function to create directly a Token Attribute Name structure.

Parameters:
value The WBXMLTagEntry value
Returns:
The newly created Attribute Name, or NULL if not enough memory

Definition at line 173 of file wbxml_elt.c.

References NULL, WBXMLAttributeName_s::u, wbxml_attribute_name_create(), and WBXML_VALUE_TOKEN.

void wbxml_attribute_name_destroy WBXMLAttributeName   name
 

Destroy an Attribute Name structure.

Parameters:
name The Attribute Name structure to destroy

Definition at line 207 of file wbxml_elt.c.

References NULL, WBXMLAttributeName_s::type, WBXMLAttributeName_s::u, wbxml_buffer_destroy(), wbxml_free(), and WBXML_VALUE_LITERAL.

Referenced by wbxml_attribute_destroy(), and wbxml_attribute_name_create_literal().

WBXMLAttributeName* wbxml_attribute_name_duplicate WBXMLAttributeName   name
 

Duplicate a Attribute Name structure.

Parameters:
name The Attribute Name structure to duplicate
Returns:
The duplicated Attribute Name structure, or NULL if not enough memory

Definition at line 219 of file wbxml_elt.c.

References NULL, WBXMLAttributeName_s::type, WBXMLAttributeName_s::u, wbxml_buffer_duplicate(), wbxml_free(), wbxml_malloc(), WBXML_VALUE_LITERAL, and WBXML_VALUE_TOKEN.

Referenced by wbxml_attribute_duplicate().

const unsigned char* wbxml_attribute_name_get_xml_name WBXMLAttributeName   name
 

Get the XML Name of a WBXML Attribute Name.

Parameters:
name The WBXML Attribute Name
Returns:
The XML Name, or "unknown" if not found

Definition at line 248 of file wbxml_elt.c.

References NULL, WBXMLAttributeName_s::type, WBXMLAttributeName_s::u, WB_UTINY, wbxml_buffer_get_cstr(), WBXML_ELT_UNKNOWN_NAME, WBXML_VALUE_LITERAL, and WBXML_VALUE_TOKEN.

Referenced by wbxml_attribute_get_xml_name().

WBXMLTag* wbxml_tag_create WBXMLValueType    type
 

Create a Tag structure.

Parameters:
type WBXML Value Type
Returns:
The newly created Tag, or NULL if not enough memory

Definition at line 49 of file wbxml_elt.c.

References NULL, WBXMLTag_s::type, WBXMLTag_s::u, wbxml_malloc(), and WBXMLValueType.

Referenced by wbxml_tag_create_literal(), and wbxml_tag_create_token().

WBXMLTag* wbxml_tag_create_literal WB_UTINY *    value
 

Additional function to create directly a Literal Tag structure.

Parameters:
value The Literal value
Returns:
The newly created Tag, or NULL if not enough memory

Referenced by wbxml_tree_clb_xml_start_element().

WBXMLTag* wbxml_tag_create_token const WBXMLTagEntry   value
 

Additional function to create directly a Token Tag structure.

Parameters:
value The WBXMLTagEntry value
Returns:
The newly created Tag, or NULL if not enough memory

Definition at line 64 of file wbxml_elt.c.

References NULL, WBXMLTag_s::u, wbxml_tag_create(), and WBXML_VALUE_TOKEN.

Referenced by wbxml_tree_clb_xml_start_element().

void wbxml_tag_destroy WBXMLTag   tag
 

Destroy a Tag structure.

Parameters:
tag The Tag structure to destroy

Definition at line 98 of file wbxml_elt.c.

References NULL, WBXMLTag_s::type, WBXMLTag_s::u, wbxml_buffer_destroy(), wbxml_free(), and WBXML_VALUE_LITERAL.

Referenced by wbxml_tag_create_literal(), wbxml_tree_clb_xml_start_element(), and wbxml_tree_node_destroy().

WBXMLTag* wbxml_tag_duplicate WBXMLTag   tag
 

Duplicate a Tag structure.

Parameters:
tag The Tag structure to duplicate
Returns:
The duplicated Tag structure, or NULL if not enough memory

Definition at line 110 of file wbxml_elt.c.

References NULL, WBXMLTag_s::type, WBXMLTag_s::u, wbxml_buffer_duplicate(), wbxml_free(), wbxml_malloc(), WBXML_VALUE_LITERAL, and WBXML_VALUE_TOKEN.

Referenced by wbxml_tree_clb_wbxml_start_element().

const unsigned char* wbxml_tag_get_xml_name WBXMLTag   tag
 

Get the XML Name of a WBXML Tag.

Parameters:
tag The WBXML Tag
Returns:
The XML Name, or "unknown" if not found

Definition at line 139 of file wbxml_elt.c.

References NULL, WBXMLTag_s::type, WBXMLTag_s::u, WB_UTINY, wbxml_buffer_get_cstr(), WBXML_ELT_UNKNOWN_NAME, WBXML_VALUE_LITERAL, and WBXML_VALUE_TOKEN.

Referenced by wbxml_tree_get_element_node_from_name().


Generated on Mon Nov 24 20:09:48 2003 for WBXML Library by doxygen1.3-rc1