Re: insert xml into sql, xml has dtd



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



.



Relevant Pages

  • Re: insert xml into sql, xml has dtd
    ... a basic requirement of XML. ... It's not valid against the DTD StoreExport.dtd. ... error in the DTD (not sure, since I haven't seen your XML data), the XML ... that is in the xml file into sql. ...
    (microsoft.public.sqlserver.xml)
  • Re: Is there a way to convert ms sql 2008 tables to XML files?
    ... After looking at the code I made it work, since I removed 2 nVARCHARcolumns from the SQL statement where it is used as an RTF. ... I have the 2 XML files the bad and the good which are below: ... Verdana;}{\f1\fnil\fcharset0 Microsoft Sans ... Here is the actual string copied from the ms sql 2008 which works fine; ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Lets think who will like to say delphi is dying?
    ... if that particular DTD rules it out. ... there are 2 basic usage forms for XML. ... HTML is/canbe quite strict too. ... Parsing and compiling are kind of the same thing.. ...
    (borland.public.delphi.non-technical)
  • Re: XML-Speicherung beim SQL Server 2005
    ... > also wenn die XML-Dokumente geparst werden, ... das der SQL Server dafür XQuery einsetzt. ... Struktur von XML. ...
    (microsoft.public.de.sqlserver)
  • Possible?? SQL Svr obtaining data via SOAP/XML from another SQL Sv
    ... SQL servers (one local, one remote through the internet). ... I used VBScript, MSXML, MSSOAP to connect, query, parse and insert data into ... XML" functionality provided in SELECT verb. ...
    (microsoft.public.sqlserver.xml)

Loading