Skip to content

Tag: xml

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

Oracle XMLTYPE extract root prolog value

I have sample Query with XML like below: Output: I am trying to fetch the values below within the query or a new query: Is there any way to do that? Any help / direction appreciated. Answer You just have to complete your first XMLTABLE query (h) in this way:

Extracting multiple values from BLOB as XML

I have an XML like this in a BLOB column: As you can see the year can be either in the event level or at country level. There can be multiple events and multiple countries per event. This whole XML is stored in a BLOB column in Oracle. I need to extract the value of the year or better check

Create XML from SQL select query

I am trying to create a xml from a SQL select, but I can not insert “:” (like cac:PartyTaxScheme), neither can put 2 data in one element, look element “cbc:CompanyID” (<cbc:CompanyID schemeName=”31″ schemeID=”0″ schemeAgencyID=”195″>900711000</cbc:CompanyID> ), how can I do it ? Next is the example I want to expect: Thanks a lot Answer Using Xml Linq :