This is a comprised article posted on the AMIS technology blog, but with a little twist. It is posted here not only for reference but also with some additional info. If you need more info, then have a look at the example here called: “Saving (XML) data directly to disk”. In short: how can you save XML data directly to local disks, making use of XMLDB / database functionality as shown in the following example (with a DBA look at things).
Category: SQL, XML/SQL, XPath, XQuery
On the OTN XMLDB Forum, a question was asked if you could directly select from a XML file on disk, or to be more precise “XQUERY / XMLTABLE Syntax to read and XML from a Windows local drive?“. I had the idea that this could be easily done, nowadays via XMLDB functionality. So I tried it and came to the following conclusions. Although tested on Oracle 11.1.0.6.0 on Windows, this should also work on Oracle 10.2.x.
So as you can read here… It can be very easily done…
Or in other words how to use namespace based on the “new” method (Oracle 10.2 and above) or the method that can be used on older versions (and newer 😉 of course). This post is just a reminder, because this is always a hassle (and I never can remember when I need to).
The post is based on a XMLDB Forum question here.