Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 28th, 2004, 10:20 AM
forrest321 forrest321 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 12 forrest321 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
XML & SQL Server 2000

I am new to XML, and could use a little help. I am writing a program that will receive an XML feed, insert that feed in a SQL table, and then process the data. I will have access to a sample XML feed, the schema, and the DTD (none of which I can provide due to that security release I signed). Is there a way to use the schema and/or the dtd to create the tables and stored procedures needed to get the XML into the tables? I understand this is a hard question to answer without seeing the sample files, but what I am looking for is a generic process that I can use to get this going, or even better, a program that will analyze the schema or dtd and generate the SQL statements to create the tables (yes, I am that lazy ;D ).

I think this is going to require SQL Server 2000's OPENXML, but I am open to suggestions if anyone has a better way.

Reply With Quote
  #2  
Old April 28th, 2004, 04:09 PM
forrest321 forrest321 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 12 forrest321 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ok I found it...xmlspy can create database structures from schemas, and it can convert DTD's to schemas.

Reply With Quote
  #3  
Old March 31st, 2005, 12:57 PM
DaveGerard DaveGerard is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 3 DaveGerard User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 27 sec
Reputation Power: 0
Ampersands

How does XmlSpy handle ampersands within XML fields? I am having issues with ampersands causing my script to crash.

Reply With Quote
  #4  
Old April 2nd, 2005, 07:12 AM
yogaboy yogaboy is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Location: Near London
Posts: 112 yogaboy User rank is Corporal (100 - 500 Reputation Level)yogaboy User rank is Corporal (100 - 500 Reputation Level)yogaboy User rank is Corporal (100 - 500 Reputation Level)yogaboy User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 14 h 37 m 29 sec
Reputation Power: 5
Ampersands are used by the xml parser as entity references, so any ampersands in your info should be converted to unicode &

I normally do this on an ASP page first using vbscript (obviously you'll have to use whatever context you are in) by doing

myString = Replace(myString, "&", "&")

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > XML & SQL Server 2000


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT