Managing Multiple XML Documents
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…
The document discusses the challenges of managing multiple XML documents, such as finding all blog entries containing the word “Cuisinart”. The author suggests using XPath queries on individual fields in the where clause in Oracle 8, SQL Server 2000, or MySQL, but notes that these are not yet widely available or compatible with Windows binaries.
Generated by Azure AI on June 24, 2024One 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.