Skip to content
Advertisement

Tag: xml

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

XMLTable query returns no result

I’m only passingly familiar with XML. I need to parse a response from a SOAP request. From a lot of searching, I’ve developed the following query to try to extract the status. Ultimately, I’d like to get the status, cntr and cntr_status fields from the response. My query gives no error, but also no results. What noob error am I

how to read a XML string value with leading space in sql server

I want to store the value of userId as ” XYZ” but when after executing the below code got output as “XYZ”. Want to store the value with leading space. Answer You may try to parse the input XML using a variable of XML data type and a combination of nodes() and value() methods: Using this approach you may parse

How to convert generic XML to a table row in PostgreSQL?

PostgresSQL v12.5 There is a table with single column containing strings formatted as XML. For simplicity let’s claim that there are no nesting: all tags inside <something> contain primitive values (strings). Assuming that there are much more elements than <a> and <b> inside, it would be great to have an option to convert these values into a relational form without

How to select values between a XML tag in SQL Query

I have a table with CLOB column storing a XML. The structure of XML is unreadable. I want to get values between few tags like <DOMAINID>; sample is shown below. XML: I am using this: Expected result: Actual XML: Answer Do not use regular expressions to parse XML; use a proper XML parser. However, what you have is not properly