Reputation: 99
I need to parse some XML which may get quite large, the root node may contain 1000's of immediate child nodes and each child node may be quite large as well. Currently the XML is in a file and I am successfully using LINQ to XML to read in to memory and validate against my schema, one child element under the root at a time. One of our goals is to NOT read the entire file into memory at once.
Another requirement is to be able to do the same but this time the XML will be stored as a CLOB or XML type column in an Oracle 11g database. I am aware that LINQ to SQL does not work with Oracle.
My question is, if the XML was being stored in a BLOB or NTEXT column in a SQL Server 2008 database, would I be able to query/read in the XML one element at a time as I am doing now from the file? If that is possible, then perhaps I can find a way to do the same against an Oracle 11g database.
Thanks
Upvotes: 0
Views: 374
Reputation: 754478
If you do move your stuff to SQL Server 2008, make sure to use the XML
as the datatype if possible. With this, you can do certain XML operations (XQuery) directly on the database.
(N)TEXT
is deprecated since 2005 - don't use it anymore!
Use (N)VARCHAR(MAX)
instead (or XML)
Or check out the DevArt offering LinqConnect which also supports "Linq-to-SQL" for Oracle ("Linq-to-Oracle" :-)
Upvotes: 1