Re: insert xml into sql, xml has dtd
- From: "Mike C#" <xyz@xxxxxxx>
- Date: Wed, 23 Jan 2008 00:00:16 -0500
BTW, SQL Server has very limited support for DTDs. Basically expanding
entities. It basically checks the DTD syntax to make sure it's correct,
expands entities, then strips the DTD away from the XML. If there is an
error in the DTD (not sure, since I haven't seen your XML data), the XML
data will not parse.
"Dee" <Dee@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4A4D0548-CAA3-4A21-8ED4-A485B42F0719@xxxxxxxxxxxxxxxx
I have been trying to post this morning and it is not going through, so
sorry
for deciding to start a new post.
I have use the code below and it creates the table and inserts one column,
but the columns seems empty. I do not seem to be able to get the
information
that is in the xml file into sql.
Here is the code:
DECLARE @xml XML;
CREATE TABLE Products(xmlCol XML)
INSERT Products
SELECT CONVERT(XML, BulkColumn, 2)
FROM OPENROWSET (BULK 'C:\database\xmldtd\yahoostore.xml', SINGLE_BLOB) AS
Products
Any suggestions? What do I need to do to insert the information from the
xml file into the sql database table along with the correct column names?
Thank you
Dee
.
- Follow-Ups:
- Re: insert xml into sql, xml has dtd
- From: Dee
- Re: insert xml into sql, xml has dtd
- Prev by Date: Re: how to insert xml into sql 2005
- Next by Date: Re: how to insert xml into sql 2005
- Previous by thread: Re: insert xml into sql, xml has dtd
- Next by thread: Re: insert xml into sql, xml has dtd
- Index(es):
Relevant Pages
|
Loading