[Gambas-devel] XML component, expat

Christian Faure christian.faurebouvard at ...156...
Fri Sep 10 17:35:48 CEST 2004


Hi Benoit
Happy birthay! 
(after somes days... Sorry)

> Look at the previous posts of Christian Faure. It works on a xml component,
> but based on the expat library.
>
> I suggest you contact you so that you share your works. You can work on the
> same library, on make twice the same component with two differents
> libraries (gb.xml.expat and gb.xml.tinyxml).
>
> When Christian and/or you have finished the components, I will come to
> ensure that their interface is nice, and, if you do two different
> components, that they are exactly the same :-)

Ok, Finished!  (for now)
Attached files contain a snapshot of the directory of my "expatc" component,
and a very simple example ( only print to console) in gambas.

1. Makefiles
I'm not a Guru of autoconf nor automake, 
so the Makefile, Makefile.in, Makefile.am need to be generic,
it reffers to absolute path on my machine!
This makefile also generate the .info and install them

I'v seen in a previous post a How-to to implement a new component,
but for te next version....

2. Requirements: expat library installed 
(i don't know the size of this)

3. The code:
When method Parse(filename) is called the parser
open file, parse and fire the correspondig gambas-events.
Principals events are:
StartElement, ChararcterData, EndElement

4. Others
In gambas (small bug?), the text editor replace "?" by "PRINT"
so you can't edit  XML files
The Attribute parameter of StartElement is declared as "o" Object 
in the signature, How can declare it as Collection?



> Regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: expatc_source_and_binary.tar.gz
Type: application/x-tgz
Size: 38096 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20040910/939d9157/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_expatc.tar.gz
Type: application/x-tgz
Size: 3326 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20040910/939d9157/attachment-0001.bin>


More information about the Devel mailing list