Re: [gdome] Gdome providing free()



Luca Padovani wrote:
> 
> 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.

That would work, except the whole reason I wanted the SaveToMemory is
that I have a 70 Mbyte XML file with 90,000 entries in it.  You could
think of it as a table with 90,000 rows, except that each row has an
arbitrary tree structure in it.  I also have an XML->HTML XSLT stylesheet
specially for this database.  So I'm parsing the XML one "row" at a
time, running it through XSLT, then using the SaveToMemory to save the
HTML to MySQL.  Now, we could write the HTML to disk, but we decided
that since we're loading other information from each "row" of the XML
into MySQL, just keep the HTML in there also.

Best,
Blair

-- 
Blair Zajac <blair orcaware com>
Plots of your system's performance - http://www.orcaware.com/orca/



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