June 13th, 2002, 05:57 AM
Parse XML data to database (ASP)
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:
<?xml version="1.0" encoding="ISO-8859-1"?>
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?
June 15th, 2002, 10:07 AM
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?
Last edited by cuboctahedron; June 15th, 2002 at 10:10 AM.
June 15th, 2002, 10:31 AM
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 10:33 AM.
June 15th, 2002, 12:24 PM
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....
June 27th, 2002, 10:23 AM
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:
Hope that helps