sp_xml_preparedocument and OPENXML

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: rob (rwc1960_at_bellsouth.net)
Date: 05/07/04


Date: Thu, 6 May 2004 22:46:51 -0400

New to xml..

I am trying to read in A REAL xml file using the sp_xml_preparedocument and
OPENXML statement as shown in BOL. I am not trying to read in a PLAY xml
file with the stuff at the top stripped out ( i.e., <?xml version=...
<UpdateProcee xmlns= etc.)

I cannot seem to make it work unless I strip out these the top 2 lines and
replace them with a <ROOT> tag...

I noticed all the examples in published books, as well as BOL, conveniently
strip these lines and replace them with <ROOT>. How do you read in real
XML files ? Real XML files do not have the tag <ROOT> in the first line,
they begin with <?xml version=....

I do not get any errors, it just returns 0 rows...

Thanks !

Are there easier ways to bring in an XML document into a table using
transact SQL, or VBscript within a DTS package ?



Relevant Pages

  • how to parse XML files with html text in them
    ... I'm trying to parse some XML files that contain newspaper articles. ... Nam dolor elit, adipiscing blandit aliquet non, pellentesque sit amet ... Dim m_xmld As XmlDocument ...
    (microsoft.public.dotnet.languages.vb)
  • Re: [PHP] Re: About XSLT/XML Pagination
    ... approach for the xsl files. ... imagining take some simple xml data, but imagine it has a DTD or XMLSchema ... database to create 1 or more xml files. ...
    (php.general)
  • Re: sp_xml_preparedocument and OPENXML
    ... > I noticed all the examples in published books, as well as BOL, ... The VBScript example below loads XML text from a file into a table: ... Real XML files do not have the tag in the first ...
    (microsoft.public.sqlserver.programming)
  • Re: [PHP] Re: About XSLT/XML Pagination
    ... approach for the xsl files. ... imagining take some simple xml data, but imagine it has a DTD or XMLSchema ... > database to create 1 or more xml files. ...
    (php.general)
  • Re: Many concurrent users of site using XPathDocument and XslTransform objects efficiently?
    ... Output caching might be very helpful, depending on how often those XML docs ... > Likely the greatest cost is reading the XML files ... XPathDocument, but noticed this on the Microsoft site concerning the ...
    (microsoft.public.dotnet.framework.performance)