|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Extracting XML data from a Table in PosgreSQLPeter pc.subscriptions at gmail.comThu Dec 27 13:33:39 PST 2007
> queries, but I don't know of one that does this - the DataDirect engine, > which has this general architecture, will allow you to use XQuery > against > data stored in relational form, but not (as far as I am aware) against > XML > stored in a relational database as text. Actually...it is possible using an extension function (ddtek:parse). The doc has an example create table xmltab (key int primary key, xmlval varchar(2000)) insert into xmltab values(1,'<a><b>1</b><b>11</b></a>') insert into xmltab values(2,'<a><b>2</b><b>22</b></a>') The following query returns the key value and b elements from the xmlval column for every b element that contains a value greater than 10: for $x in collection('xmltab')/xmltab let $y := ddtek:parse($x/xmlval)//b[xs:integer(.) > 10] return (data($x/key),$y) I am unfamiliar with the latest changes in terms of product architecture, but with the last version I knew some of the internals, this approach would only be practically feasible on 'smaller' XML fragments.
|
Purchase Stylus Studio Online Today!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






