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

wbxml_encoder.h File Reference

WBXML Encoder - Encodes a WBXML Tree to WBXML or to XML. More...

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define wbxml_encoder_create()   wbxml_mem_cleam(wbxml_encoder_create_real())

Typedefs

typedef WBXMLEncoder_s WBXMLEncoder
 WBXML Encoder.

typedef enum WBXMLEncoderXMLGenType_e WBXMLEncoderXMLGenType
 Type of XML Generation.


Enumerations

enum  WBXMLEncoderXMLGenType_e { WBXML_ENCODER_XML_GEN_COMPACT = 0, WBXML_ENCODER_XML_GEN_INDENT, WBXML_ENCODER_XML_GEN_CANONICAL }
 Type of XML Generation. More...


Functions

WBXMLEncoderwbxml_encoder_create_real (void)
 Create a WBXML Encoder
Returns:
Return the newly created WBXMLEncoder, or NULL if not enough memory.


void wbxml_encoder_destroy (WBXMLEncoder *encoder)
 Destroy a WBXML Encoder.

void wbxml_encoder_set_ignore_empty_text (WBXMLEncoder *encoder, WB_BOOL set_ignore)
 Set the WBXML Encoder to ignore empty texts (ie: ignorable Whitespaces) [Default: FALSE].

void wbxml_encoder_set_remove_text_blanks (WBXMLEncoder *encoder, WB_BOOL set_remove)
 Set the WBXML Encoder to remove leading and trailing blanks in texts [Default: FALSE].

void wbxml_encoder_set_use_strtbl (WBXMLEncoder *encoder, WB_BOOL use_strtbl)
 Set if we use String Table when Encoding into WBXML [Default: TRUE].

void wbxml_encoder_set_wbxml_version (WBXMLEncoder *encoder, WBXMLVersion version)
 Set the WBXML Version of the output document, when generating WBXML [Default: 'WBXML_VERSION_TOKEN_13' (1.3)].

void wbxml_encoder_set_xml_gen_type (WBXMLEncoder *encoder, WBXMLEncoderXMLGenType gen_type)
 Set the WBXML Encoder XML Generation Type, when generating XML [Default: WBXML_ENCODER_XML_GEN_COMPACT].

void wbxml_encoder_set_indent (WBXMLEncoder *encoder, WB_UTINY indent)
 Set the WBXML Encoder indent, when generating XML in WBXML_ENCODER_XML_GEN_INDENT mode [Default: 0].

void wbxml_encoder_set_tree (WBXMLEncoder *encoder, WBXMLTree *tree)
 Set the WBXML Tree to encode.

WBXMLError wbxml_encoder_encode_to_wbxml (WBXMLEncoder *encoder, WB_UTINY **wbxml, WB_ULONG *wbxml_len)
 Encode a WBXML Tree to WBXML.

WBXMLError wbxml_encoder_encode_to_xml (WBXMLEncoder *encoder, WB_UTINY **xml)
 Encode a WBXML Tree to XML.


Detailed Description

WBXML Encoder - Encodes a WBXML Tree to WBXML or to XML.

Author:
Aymerick Jéhanne <libwbxml@jehanne.org>
Date:
11/11/02

Definition in file wbxml_encoder.h.


Function Documentation

WBXMLEncoder* wbxml_encoder_create_real void   
 

Create a WBXML Encoder

Returns:
Return the newly created WBXMLEncoder, or NULL if not enough memory.

Warning:
Do NOT use this function directly, use wbxml_encoder_create() macro instead

Definition at line 306 of file wbxml_encoder.c.

References WBXMLEncoder_s::attrCodePage, WBXMLEncoder_s::current_attr, WBXMLEncoder_s::current_tag, FALSE, WBXMLEncoder_s::ignore_empty_text, WBXMLEncoder_s::in_content, WBXMLEncoder_s::indent, WBXMLEncoder_s::indent_delta, NULL, WBXMLEncoder_s::output, WBXMLEncoder_s::output_type, WBXMLEncoder_s::remove_text_blanks, WBXMLEncoder_s::tagCodePage, WBXMLEncoder_s::tree, TRUE, WBXML_ENCODER_OUTPUT_WBXML, WBXML_ENCODER_XML_GEN_COMPACT, wbxml_free(), wbxml_list_create, wbxml_malloc(), WBXMLEncoder_s::wbxml_version, WBXML_VERSION_13, WBXMLEncoder_s::xml_encode_header, and WBXMLEncoder_s::xml_gen_type.

void wbxml_encoder_destroy WBXMLEncoder   encoder
 

Destroy a WBXML Encoder.

Parameters:
encoder The WBXMLEncoder to free

Definition at line 352 of file wbxml_encoder.c.

References NULL, WBXMLEncoder_s::output, wbxml_buffer_destroy(), wbxml_free(), and wbxml_list_destroy().

Referenced by wbxml_conv_wbxml2xml(), wbxml_conv_xml2wbxml(), wbxml_encoder_encode_to_wbxml(), and wbxml_encoder_encode_to_xml().

void wbxml_encoder_set_tree WBXMLEncoder   encoder,
WBXMLTree   tree
 

Set the WBXML Tree to encode.

Parameters:
encoder [in] The WBXML Encoder to use
tree [in] The WBXML Tree to encode
Note:
You MUST call this function before calling following wbxml_encoder_encode() or wbxml_encoder_encode_to_xml() function

Definition at line 432 of file wbxml_encoder.c.

References NULL, and WBXMLEncoder_s::tree.

Referenced by wbxml_conv_wbxml2xml(), and wbxml_conv_xml2wbxml().

void wbxml_encoder_set_wbxml_version WBXMLEncoder   encoder,
WBXMLVersion    version
 

Set the WBXML Version of the output document, when generating WBXML [Default: 'WBXML_VERSION_TOKEN_13' (1.3)].

Parameters:
encoder [in] The WBXML Encoder
version [in] The WBXML Version

Definition at line 400 of file wbxml_encoder.c.

References NULL, WBXMLEncoder_s::wbxml_version, WBXML_VERSION_UNKNOWN, and WBXMLVersion.

Referenced by wbxml_conv_xml2wbxml().

void wbxml_encoder_set_xml_gen_type WBXMLEncoder   encoder,
WBXMLEncoderXMLGenType    gen_type
 

Set the WBXML Encoder XML Generation Type, when generating XML [Default: WBXML_ENCODER_XML_GEN_COMPACT].

Parameters:
encoder [in] The WBXML Encoder
gen_type [in] Generation Type (cf. WBXMLEncoderXMLGen enum)

Definition at line 412 of file wbxml_encoder.c.

References NULL, WBXMLEncoderXMLGenType, and WBXMLEncoder_s::xml_gen_type.

Referenced by wbxml_conv_wbxml2xml().


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