Skip to content

Tag: xml

Parse text and special characters from SQL Server

I have an issue with parsing text with special characters from XML in SQL Server. Let’s say I have a XML file Sample.xml which has the following data: I prepared the following SQL script which can parse everything except two sentences in the <TextType> attribute: First sentence to retrieve Second sentence to retrieve Could you please help me to add

Returning multiple XML from ref cursor oracle

There is a procedure in the Oracle DB which takes a date range and generates XML file for each day and the return type is ref cursor. When the procedure is called from C# code, I am unable to extract the XML from the cursor. Any pointers will be helpful on how to extract the XML Below given is the

Get all values for the XML file in SQL

I have tried the @Name and I get all the values such as DefCurrency, IsICP etc but I don’t get the values. See my code below. Thanks in advance Answer All supported versions of Microsoft SQL Server have the nodes() and value() methods available for querying the XML data type, e.g.: Which yields the output: LABEL val DefCurrency [None] AllowAdjs

Is XPath the same as Linq? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 9 months ago. Improve this question I studied the concept of XPath and xml but did not understand how they relate to what XPath is designed to do as a query

How to delete more than one node with xml-query

with this code, I can remove one node (field_without_interest) of this xml element. But I would like to remove two nodes now( field_without_interest and PERSON_NUMBER). I have tried to place the for loop at differents places (You can see that in code. But I don’t think it useful to for to write every attemps in stackoverflow) but to no avail.

Convert List Of XML Tags in varchar column to comma separated list

I have a table that contains a list of xml tags/values that I need to use to join to another table to retrieve their actual value and display the result as a csv list. Example varchar data: However, these values actually translate to other values: red, white, blue respectively. I need to convert that list to the following list: As

Create hierarchical summary of XML nodes

Is there a way of using SQL or Python (or another language) to return the node-tree for an XML document? In the XML document example below, the employee node appears twice but the second time it has more nodes within it… same with the address node. Is there a way to return the structure (without values contained within the tags)

Converting XML to a dataframe R and extracting value from within

I have the following XML which I am trying to convert into a data frame in R or a table within SQL: I’ve tried using XMLtoDataFrame (“xml” library) but this just creates a table without any values. Would anyone be able to help with this please? Open to a SQL solution. Edit: I’m looking for my table to be in