[Gambas-devel] XML component, expat
ron
ronstk at ...124...
Sun Sep 12 23:18:25 CEST 2004
On Friday 10 September 2004 17:35, Christian Faure wrote:
> 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,
>
I did a try of it.
The example instructions from the wiki or yours did not work very well.
I add the GB_COMPONENT and expand the AC_??? part as told.
The .info was not made, so I dropped the symlinks as in the wiki
and did a reconf, configure, make and make install to be sure all was
done.
It worked but gives a error on the line with the comment in test.xml
Nice to play with but I hope the libxml will deliver a DOM tree object.
As a simple component example, i can learn from it :)
Ron
More information about the Devel
mailing list