RE: [Fwd: Re: Pregunta sobre el estado de gnome-db para el desarrollo]

On jeu, 15 jun 2000, you wrote:
> > > then, I'll add a Gda_XmlObject which wraps all access to the specific
> > > items on each XML file format. For example, Gda_XmlQuery would be a
> > > subclass of this Gda_XmlObject.
> >
> > I've already started to make a Gda_XmlQuery object from a GtkObject, but I
> > can modify it when the Gda_XmlObject is ready. However, I don't see the
> point
> > of having a Gda_XmlObject. Couldn't Gda_XmlQuery be derived from
> Gda_XmlFile
> > like Gda_XmlReport? What do you want to put in that Gda_XmlObject object?
> >
> Well, I was thinking that a Gda_XmlObject is an element in a Gda_XmlFile
> object. For example:
>   <TABLE NAME="table1">
>      <FIELD NAME="field1"/>
>   </TABLE>
>   <VIEW NAME="view1">
>   </VIEW>
> Here, DATABASE is the Gda_XmlFile. But, TABLE, FIELD and VIEW are
> Gda_XmlObject. And any Gda_XmlObject can in turn have several child
> Gda_XmlObject.
> I've made this distinction to separate what is the real XML file, and all
> the elements on it. And, because, as we said, a Gda_XmlQuery must be able to
> be saved in a file on its own, or as part of a Gda_XmlReport, so having it
> as a Gda_XmlObject (= an element in a Gda_Xmlfile) would allow to do so.
> Or am I wrong?

In Gda_XmlQuery, I use the xmlNodePtr directely and it seems to be fine. For
example, you can ask to have a Gda_XmlQuery object built from a part of an xml
structure by using gda_xml_query_new_from_node(). However I'm not sure we need
to have objects built for all the elements of what is in the xml file because:
* I don't see very much usage for it,
* it would consume a lot of memory,
* it can be very tricky to keep the xml structure up to date with the structure
of these objects.

But the idea of having Gda_XmlQuery as a subclass of Gda_XmlFile is IMHO a good

What do you think?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]