Re: [gdome] Gdome providing free()



Hi Blair,

On Mon, 2003-03-17 at 22:05, Blair Zajac wrote:
> Looks like gdome_str_mkref_xml would do the trick really easy without
> making a copy, but the comment says is deprecated.

well, I don't remember exactly the reason why this is deprecated. My
guess is that it should be deprecated from the user's point of view.
That is to say, the user should never be in the condition of creating
itself a GdomeDOMString starting from an xmlChar* string. That would
mean that the user has somehow violated the Gdome2 layer and has gained
access to the underlying libxml2 library, which we are trying to hide.
In any case, the function is definitely _not_ deprecated from Gdome2's
point of view. In fact, we would call that method _internally_, from
within Gdome2, and would return the GdomeDOMString ready to be used.

> The serialized document is being dumped into a MySQL table, so there's
> really no choice about that, as MySQL can't store a tree structured document.

I see. A proposal (please forgive me if it sounds naive or
inappropriate, but I don't know exactly the context you are in): why not
storing the document _outside_ the database, and have just the URI of
the document in MySQL. We are using a similar approach which, I can say,
gives pretty good results (and we have thousands of XML documents some
of which are really huge). Note that you can use logical URIs and define
your favorite mapping from URIs to physical directories. Note also that
this way you can store gzipped documents on the hard drive and
uncompress them on-the-fly as you access them.

-- luca





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