Managing Multiple XML Documents

By Deane Barker 1 min read
AI Summary

This post explores strategies for managing multiple XML documents efficiently, discussing techniques such as modular design, validation, and transformation. The author emphasizes best practices to enhance maintainability and readability, ensuring a robust approach to XML document handling in various applications.

One of the continuing quandaries 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.

Links to this – Database / XML Hybrid Content Management December 6, 2003
Thoughts on Content Management : This guy and I think alike. In the beginning of the article he touches on the same things I talked about when I compared open and closed content management systems . Then, he runs into the same problem: there are too many types of content, each storing their own...
Links to this – Is the Relational Model the Best Model? September 1, 2005
Is the relational model of data storage the best, most efficient way to store data? I’m talking about the traditional database model of tables, fields, row, foreign keys, etc. What are the other ways? There’s object oriented, where you have a table of classes and attributes, object instances and...
Links from this – Supplemental Indexing in Content Management February 21, 2012
Having a separate index of CMS content, structured for optimal querying, can help you solve a lot of sticky problems.