xquery

How to query xml column in TSQL for specific text

风流意气都作罢 提交于 2020-07-16 10:39:37
问题 I am trying to query the word Simple out the following XML Document. The column is xml data type, the column name is InstanceSecurity . <InstanceSecurity> <Folder> <Authorization Mode="Simple"> <Deny PrivilegeCode="Create" /> <Deny PrivilegeCode="Delete" /> <Deny PrivilegeCode="Edit" /> <Deny PrivilegeCode="Read" /> <Deny PrivilegeCode="View" /> <Deny PrivilegeCode="Print" /> <Allow PrivilegeCode="All" EntityType="Personnel" EntityVal="5bc2" /> <Allow PrivilegeCode="All" EntityType="Personnel

SQL Server XML Column Performance

柔情痞子 提交于 2020-06-28 06:03:50
问题 Converting nText columns which contained XML to the XML data type has resulted in worse performance in SQL Server. I am currently working on a project where nText columns have been used to store valid XML. I have successfully migrated these columns to the XML data type. However according to SQL Profiler the performance of the XML data type is worse than using nText or nvarchar(max) to store the XML. Everything I have read implies that this should not be the case. In order to verify this I

Loading and saving text-data of a “plugined” textarea in eXist-db with HTML forms

╄→尐↘猪︶ㄣ 提交于 2020-06-17 10:06:53
问题 My original need was that of getting a plugin (tailwriter) to work with XForms (within eXist-db + XSLTForms), in order to transform textareas into markdown editors. It turned out, however, to be a hard issue to be solved, in reason of the "difficult relations" between the CSSs and JSs used by the plugin and by XSLTForms (overlapping and conflicts). In other words, I couldn't succeed in applying the plugin to any xf:textarea. Therefore I opted for using a simple HTML form. This way I was able

Read an unknown XML with namespaces, attributes etc. into a full EAV list

陌路散爱 提交于 2020-06-09 05:37:30
问题 After answering a question about how to read an unknown JSON I tried to find something similar for XML (triggered by this related question). The question is: How can I read the whole and everything out of an unknown XML? The ideal output is an EAV-list in the expected sort order together with a full XPath for the element: Full XPath (aware of any namespace and element position) Element's or attribute's name (with namespace) Content ( text() node or attribute's value) As the sort order is an

How to pass an HTML widget's value from an HTML form to an Xquery in eXist-db?

会有一股神秘感。 提交于 2020-06-01 05:08:23
问题 In my intention this question represents an universalization of a specific issue indicated in a previous request: see related question (this is why I dare to send a second help request). I still cannot find an answer to the problem of how exacltly an html widget's value could be passed to an Xquery. The specific widget is a textarea, added to an html form (not to an XForm!) by means of the external function, the code of which can be found within the mentioned related question. So, the

Simple XQuery FLWOR to return text without numbers

╄→гoц情女王★ 提交于 2020-04-16 06:08:11
问题 How do I return non-numeric text? for $foo in db:open("foo") return $foo//text() Assuming that every address or phone number cell from the original spreadsheet has numerals, I'm looking to return any string without numerals. context, per Michael Kay's note: Each cell of the spreadsheet has a String. There's only one column of what can easily be CSV data. Seemingly, only the names lack numerals. On that assumption, looking to break the data into "chunks" to differentiate each individual. There

SQL Server XML querying: Query multiple child elements with same name

£可爱£侵袭症+ 提交于 2020-03-23 09:51:43
问题 In a previous question I wanted to know how I can use SQL to JOIN different XML elements based on an identifier. I was provided with several nice solutions as you can see here. Now I am in the process of adapting this solution to my actual data. Unfortunately I stumbled upon a new obstacle that was not present in the minimum viable example I provided in the linked question. In my actual data I also have several child elements of the same name. See the element <subElement> in the following

SQL Server XML querying: Query multiple child elements with same name

纵然是瞬间 提交于 2020-03-23 09:51:13
问题 In a previous question I wanted to know how I can use SQL to JOIN different XML elements based on an identifier. I was provided with several nice solutions as you can see here. Now I am in the process of adapting this solution to my actual data. Unfortunately I stumbled upon a new obstacle that was not present in the minimum viable example I provided in the linked question. In my actual data I also have several child elements of the same name. See the element <subElement> in the following

XQuery unexpected end of query on namespace declaration

喜你入骨 提交于 2020-03-21 05:58:22
问题 I'm trying to execute this query: declare variable $doc as xs:string external; declare namespace type4="http:///de/tudarmstadt/ukp/dkpro/core/api/segmentation/type.ecore"; fn:doc($doc)//type4:Lemma/@value within the BaseX java driver. The actual code snippet looks like this: String queryString = "declare variable $doc as xs:string external; " + "declare namespace type4=\"http:///de/tudarmstadt/ukp/dkpro/core/api/segmentation/type.ecore\"; " + "fn:doc($doc)//type4:Lemma/@value"; Set<String>

XQuery unexpected end of query on namespace declaration

只愿长相守 提交于 2020-03-21 05:58:19
问题 I'm trying to execute this query: declare variable $doc as xs:string external; declare namespace type4="http:///de/tudarmstadt/ukp/dkpro/core/api/segmentation/type.ecore"; fn:doc($doc)//type4:Lemma/@value within the BaseX java driver. The actual code snippet looks like this: String queryString = "declare variable $doc as xs:string external; " + "declare namespace type4=\"http:///de/tudarmstadt/ukp/dkpro/core/api/segmentation/type.ecore\"; " + "fn:doc($doc)//type4:Lemma/@value"; Set<String>