XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

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 Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old June 13th, 2002, 04:57 AM
cuboctahedron cuboctahedron is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Netherlands
Posts: 424 cuboctahedron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 22 h 39 m 26 sec
Reputation Power: 7
Parse XML data to database (ASP)

Hi everyone,

I havent came accros a website which gives me a tutorial on how to insert XML data in to a database using ASP (MS-Access I am currently using for testpurposes).

My example page looks like:
page1------------------ source.xml--------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<CATALOG>
<CD>
<TITLE>Bad</TITLE>
<ARTIST>Micheal Jackson</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>

</CD>
<CD>
<TITLE>Thriller</TITLE>
<ARTIST>Micheal Jackson</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>CBS Records</COMPANY>
</CD>
etc.
---------------------------------------------------------------

Since I can display the result in a data-island, it would seem logical to be able to insert them in a database, instead of on the sreen. I havent been able to do so yet.

Kan anyone help me please?

Kind regards
Patrick

Reply With Quote
  #2  
Old June 15th, 2002, 09:07 AM
cuboctahedron cuboctahedron is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Netherlands
Posts: 424 cuboctahedron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 22 h 39 m 26 sec
Reputation Power: 7
I am rather dazzled that nobody, (qualified programmers, friends, forum, and xml books, google and xml-websites etc.) can give straight forward answer on how to parse data in a raw xml file to a database. Yes the other way around is easy.
I suppose I must than write a ASP script that:
1) strips the tags away
2) reads every line from the xml(=txt) file
3) checks if there is a value
4) insert that value in a database

Didnt anyone of you encountered this problem at all?

Regards
Patrick

Last edited by cuboctahedron : June 15th, 2002 at 09:10 AM.

Reply With Quote
  #3  
Old June 15th, 2002, 09:31 AM
Hero Zzyzzx's Avatar
Hero Zzyzzx Hero Zzyzzx is offline
11
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2001
Location: Lynn, MA
Posts: 4,632 Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 23 h 12 m 33 sec
Reputation Power: 77
Send a message via AIM to Hero Zzyzzx
You're at a forum that is dedicated to open-source technologies, not those from the Evil Empiretm like ASP or Access.

Therefore, it's not surprising that you haven't gotten an answer- you're posting in the wrong place.

I suggest do a google search for "asp forum" and see what pops up.

I know a bunch of fast, stable ways I'd do this with perl (XML::Simple and DBI would do almost all my work for me). If you're not bound to ASP, I suggest you check out PHP or perl for getting your work done.

Last edited by Hero Zzyzzx : June 15th, 2002 at 09:33 AM.

Reply With Quote
  #4  
Old June 15th, 2002, 11:24 AM
cuboctahedron cuboctahedron is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Netherlands
Posts: 424 cuboctahedron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 22 h 39 m 26 sec
Reputation Power: 7
I know ASP isnt popular with many people.
This xml forum, I presumed, was however for anyone interested in XML, dispite the language one prefers to use.

I have tracked so many website on the net, but am unable so far to find a tutorial, script or help regarding the problem I mentioned above.

Many sites mumble about xml, but a basic question about parsing a standard xml file,like the one above, in (indeed) ASP is something nobody can seen to answer. Everyone focusses on DTD, DOMs, SOAP XLS an so on. For me XML would only proof beneficial if I were able to transfer data from one database system to another.

I just cannot imagine I am the only ASP-guy out there dealing with this basic feature of xml.

Well, I still hope someone will be able to help....

Cheers
Patrick

Reply With Quote
  #5  
Old June 27th, 2002, 09:23 AM
vladiator vladiator is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Posts: 6 vladiator User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I'm afraid I don't completely understand your problem. If you are looking to parse your XML file with ASP to get/group/manipulate the values, it is actually quite easy using XML DOM. You can find reference and examples for it here:

http://www.w3schools.com/dom/default.asp

Hope that helps

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Parse XML data to database (ASP)


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 6 hosted by Hostway