Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 1st, 2006, 10:14 AM
Registered User
 
Join Date: Aug 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Export SQL To XML

I am trying to mirror the following XML structure via SQL

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ocs-b2b-document-request SYSTEM "HTTP://www.ntorder-dev.com/ocs-b2b-document-request.dtd">
<ocs-b2b-document-request>
 <header>
  <authentication-info>
   <username>username</username>
   <password>password</password>
  </authentication-info>
 <document-info>
 <document-uid>Mult_Order-09999-2006-07-27 10:47:40.062</document-uid>
 <document-date>2006-07-27 10:47:40.062</document-date>
 </document-info>
 </header>
 <body>
  <order-entry>
   <orderHeader>
    <memberOrderNumber>Test1</memberOrderNumber>
    <scheme>WAY</scheme>
    <store>Z12345</store>
    <orderDate>2006-07-27</orderDate>
   </orderHeader>
   <orderLine>
    <itemCode>41160</itemCode>
    <quantity>1</quantity>
   </orderLine>
  </order-entry>
  <order-entry>
   <orderHeader>
    <memberOrderNumber>Test2</memberOrderNumber>
    <scheme>WAY</scheme>
    <store>Z12346</store>
    <orderDate>2006-07-29</orderDate>
   </orderHeader>
   <orderLine>
    <itemCode>11235</itemCode>
    <quantity>1</quantity>
   </orderLine>
  </body>
 </ocs-b2b-document-request>

I have created a universal table as part of my approach and the fields that are coming from the universal table are higlighted as bold.

Would appreciate any guidance to mirror the above and the best way to execute the extraction of the data e.g. via DTS.

Thanks





Similar Threads
Thread Thread Starter Forum Replies Last Post
Relational SQL Data to XML - Vet SQL/ASP - New XML JimiTheJett XML 1 December 4th, 2008 06:06 PM
scheduled export to XML file from sql 2005 jjhm93 XML 0 November 28th, 2006 07:02 AM
Trigger/XML Export Neal Access VBA 2 March 30th, 2006 11:43 PM
How to Export SQL Server Table to XML file??? bekim XML 1 October 4th, 2004 03:52 AM
Export to XML from DB HamishF SQL Server 2000 8 December 21st, 2003 05:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.