|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
||||
|
||||
|
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. |
|
#4
|
|||
|
|||
|
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 |
|
#5
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Parse XML data to database (ASP) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|