Managing Multiple XML documents

May 26

Managing Multiple XML documents

One of the continuing quandries I’ve had with XML is the management of multiple XML documents. If I have one, big XML document, then it’s easy to work with — to parse with an API, to transform with XSLT, to query with XPath.

But what if I have many documents? For instance, what if I have all my blog entries (400+ at last count) as individual XML documents in a directory somewhere and I want to find all entries containing the word “cuisinart”? What do you do then? Iterate through all the documents firing off XPath queries and somehow persist all the documents that match then go back and get them when the loop is done? This seems ugly, but the alternative — having everything in one, monolithic XML document — seems worse.

I’ve heard that Oracle 8 will let you do an XPath query on an individual field in the WHERE clause. I’m trying to figure out if SQL Server 2000 will let you do the same thing. MySQL would be even better, but perhaps that’s hoping for too much.

There are some XML databases out there (Xindice, for instance; more here), but they’re very new and I don’t know of any that have Windows binaries or that will work without me getting all geeked out.


Comments

by Ted Thibodeau Jr,   July 25, 2003 9:01 PM  

Check out Virtuoso. http://www.openlinksw.com/virtuoso/

It's not free (well, it's got a 30-day extendable evaluation license), but it's powerful...

SQL-92 database (both Virtual and Relational DBMS) blended with XML database, with built in X-Path and XQuery support, as well as XSLT, and bunches more. Including Blogger, MetaWeblog, and Moveable Type API support -- from both client and server perspectives -- in the latest update (v3.2)!

I can't do it justice in a comment -- and it'll probably seem like marketing speak, since I work at OpenLink Software, which publishes Virtuoso... I don't benefit directly from downloads or sales...

Check it out. Let me know what you think.


by Tom Dyson,   August 7, 2003 9:34 AM  

Our open source XML extensions for PostgreSQL do exactly what you want: provide XPath support within your SQL statements.

SELECT title FROM documents WHERE xpath_string(xml,'/document/title') = 'Konrad Lorenz';

or

SELECT xpath_string(xml,'/document/title') AS title FROM documents WHERE id = 22;

The extensions are based on the very fast and lightweight libxml2 library. See:

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

http://www.xmlsoft.org/



Add Comment


Want to advertise on this site? Contact FM.
Laser Toner Cartridges UK laser toner, toner cartridges, hp toner, lexmark toner, samsung toner, canon, toner, epson toner, oki toner, kyocera toner, xerox toner, remanufactured toner, compatible toner
Direct TV Deals Free 4 room direct tv deals. no equipment to buy. free fast professional direct tv installation. this is the best direct tv deal available anywhere.
SEO Article Learn from the experts with our SEO article.
rope light Shopping with birddog distributing, inc., gives you access to the lowest prices, the best customer service and the quickest delivery times possible.
Laptop AC Adapter We offer genuine factory direct replacement AC adapters.
Direct TV Best satellite TV deals.
Direct TV Deals Direct TV programming deals are varied and include packages containing from 50 channels up to over 250 channels.
8mm film to DVD Retain family memories with the only frame by frame digital restoration service in the United States for your 8mm film to DVD today
Rubber Stamp Shop for custom self-inking stamps, hand stamps, address stamps, label stamps, check endorsement stamps, check deposit stamps, date stamps, pre inks, pocket stamps, ink and much more!