[Gambas-devel] XML component, expat
Benoit Minisini
gambas at ...1...
Fri Sep 10 19:40: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 can make the Makefile if needed.
>
> I'v seen in a previous post a How-to to implement a new component,
> but for te next version....
I put this Howto on the wiki. You can read it if you want.
>
> 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
If possible, you should allow to parse from a string directly.
>
> 4. Others
> In gambas (small bug?), the text editor replace "?" by "PRINT"
> so you can't edit XML files
LOL! Funny bug, I fix it...
> The Attribute parameter of StartElement is declared as "o" Object
> in the signature, How can declare it as Collection?
Replace 'o' by 'Collection;'. Note the semicolon at the end of the class name.
>
> > Regards,
I will check your component as soon as possible. I don't have the time I had
last month, because the acting studies started again!
Regards,
--
Benoit Minisini
mailto:gambas at ...1...
More information about the Devel
mailing list