[xml] persisting parsed DOMs



I've just joined the list, so apologies if this has been covered before (I
can't find any references in the archives).

I've been working - with John Gray - on enabling XPath queries within the
PostgreSQL database:

http://www.throwingbeans.org/tech/postgresql_and_xml.html

These functions - which are used in several high traffic websites - are
wrappers around libxml2. Performance is good, but will necessarily decrease
as the number of database records increases; to evaluate an XPath expression
against the contents of a column in 500 records requires the creation by
libxml of 500 DOMs from the XML fragments. Since PostgreSQL supports
user-defined column types -

http://www.postgresql.org/docs/view.php?version=7.3&file=sql-createtype.html

- it may be beneficial to create a native 'XML' type column for storing
parsed DOM representations of XML strings. Which leads me to my question:
Does libxml2 support the persistence of parsed DOM representations? If so,
would this offer a significant performance advantage? If not, can you
suggest any other routes to performance improvement (reusing compiled XPath
expressions, perhaps)?

Many thanks 

Tom

-----------------+
tom dyson
t: +44 (0)1608 811870
m: +44 (0)7958 752657
http://torchbox.com




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