nativexml

uniqness insertion in native xml database

五迷三道 提交于 2020-01-24 13:00:08
问题 I am developing a project based on XML. I use the Sedna database to store my collection (which contains XML files, and their XSD schema files). I define the primary/unique keys in those schemes, but till now I can insert duplicate values (via XQuery update insert command) into primary key field. 回答1: To guarantee uniqueness constraint you should create BEFORE INSERT FOR EACH NODE trigger on proper path. In the trigger action the $NEW transitive variable can be used to fetch the new key and

How do I iterate through similar nodes in an XML document using NativeXML in Delphi?

蓝咒 提交于 2019-12-25 01:39:16
问题 I am currently using NativeXML in Delphi and I have this XML document with the following structure: <?xml version="1.0"?> <Request> <RequestId>5429935816</RequestId> <CompletedDate>2012-07-12T12:06:57+00:00</CompletedDate> </Request> <RequestId> <RequestId>5428581330</RequestId> <CompletedDate>2012-07-12T04:21:46+00:00</CompletedDate> </Request> Basically I need to know the value of each RequestID in the document. Thank you in advance, and regards. 回答1: Here is some code (not tested, written