1.2

| home | graph lib | utility lib | auxiliary lib | custom lib | tutorials |

   Curl
   Expact
   SQLITE
   Window

zeExpat

Use lib.new("xml") to create the object. It is a simple binding of Expat library to Lua for parsing XML file. One purpose is for serialize zeArray data.

.callback(func1, func2, func3)

func1- start callback function.
func2- end callback function.
func1- data callback function.

Sets callback functions. The start callback function should process the depth of a opening tag, the tag name, and the key-attribute pairs belonging to the tag. The end callback function should process the depth of the closing tag and the tag name. The data callback function should process contents between the opening and closing tags.

.version()

Returns the vertion number as string.

.new("xml", func1, func2, func3)

func1- start callback function.
func2- end callback function.
func1- data callback function.

Creates a XML parser. The start callback function should process the depth of a opening tag, the tag name, and the key-attribute pairs belonging to the tag. The end callback function should process the depth of the closing tag and the tag name. The data callback function should process contents between the opening and closing tags.

:parse(string)

string - a text string.

Pasrses the XML string. Return nil if not successful.

.isblank(s)

s - a string returns true if characters in the string are all blank; and returns false otherwise.

:error()

Returns the error message.

.mbs2utf(string)

string - a text string.

Converts the input of multi-byte string to UTF-8 string. Return the result.

.utf2mbs(string)

string - a text string.

Converts the input UTF-8 string to multi-byte string. Return the result.