Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- DROP TABLE TablaDatos_xml
- DROP XML SCHEMA COLLECTION XMLTableRSS
- */
- CREATE XML SCHEMA COLLECTION XMLTableRSS AS
- N'<?xml version="1.0" encoding="UTF-16"?>
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:sqltypes="http://schemas.microsoft.com/sqlserver/2004/sqltypes">
- <xsd:import namespace="http://schemas.microsoft.com/sqlserver/2004/sqltypes"
- schemaLocation="http://schemas.microsoft.com/sqlserver/2004/sqltypes/sqltypes.xsd" />
- <xsd:element name="channel">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="title" type="sqltypes:nvarchar" />
- <xsd:element name="link" type="sqltypes:nvarchar" />
- <xsd:element name="description" type="sqltypes:nvarchar" />
- <xsd:element name="language" type="sqltypes:nvarchar" minOccurs="0" />
- <xsd:element name="copyright" type="sqltypes:nvarchar" />
- <xsd:element name="managingEditor" type="sqltypes:nvarchar" />
- <xsd:element name="webMaster" type="sqltypes:nvarchar" />
- <xsd:element name="pubDate" type="sqltypes:nvarchar" />
- <xsd:element name="lastBuildDate" type="sqltypes:nvarchar" />
- <xsd:element name="category" type="sqltypes:nvarchar" />
- <xsd:element name="generator" type="sqltypes:nvarchar" />
- <xsd:element name="docs" type="sqltypes:nvarchar" />
- <xsd:element name="cloud" type="sqltypes:nvarchar" />
- <xsd:element name="ttl" type="sqltypes:nvarchar" />
- <xsd:element name="image" type="sqltypes:nvarchar" />
- <xsd:element name="textInput" type="sqltypes:nvarchar" />
- <xsd:element name="skipHours" type="sqltypes:nvarchar" />
- <xsd:element name="skipDays" type="sqltypes:nvarchar" />
- <xsd:element name="item">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="title" type="sqltypes:nvarchar" />
- <xsd:element name="link" type="sqltypes:nvarchar" />
- <xsd:element name="description" type="sqltypes:nvarchar" />
- <xsd:element name="author" type="sqltypes:nvarchar" />
- <xsd:element name="category" type="sqltypes:nvarchar" />
- <xsd:element name="comments" type="sqltypes:nvarchar" />
- <xsd:element name="enclosure" type="sqltypes:nvarchar" />
- <xsd:element name="guid" type="sqltypes:nvarchar" />
- <xsd:element name="pubDate" type="sqltypes:nvarchar" />
- <xsd:element name="source" type="sqltypes:nvarchar" />
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>';
- CREATE TABLE TablaDatos_xml
- (
- id INT IDENTITY(1,1) PRIMARY KEY,
- xml_table XML(XMLTableRSS)
- );
- INSERT INTO TablaDatos_xml ( xml_table )
- VALUES
- ('<channel>
- <title>Listin Diario</title>
- <link>http://www.listindiario.com.do</link>
- <description>pagina del listin diario</description>
- <item>
- <title>NOTICIA 01</title>
- <link>http://www.listindiario.com.do/01</link>
- <description>NOTICIA 01</description>
- </item>
- </channel>');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement