SitePoint Sponsor |
|
User Tag List
Results 1 to 8 of 8
Thread: XML: Is this possible
-
May 5, 2002, 15:17 #1
- Join Date
- Jan 2002
- Posts
- 420
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
XML: Is this possible
I am creating a catalog of my cds that I own etc. I have decided to use XML to store the info about each disc. Then make a page to display it with XSL.
My question is:
Is it possible to make a form in which when you fill it out it writes the info into the XML file, sorta like adding a new cd to the collection?
If so how would this be done? Would I need special software installed?
Thankyou.Wavelan
-
May 5, 2002, 17:59 #2
- Join Date
- Nov 2001
- Location
- London, UK
- Posts
- 502
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
yeap very easy:
just follow this turorial:
http://www.xml101.com/articles/micha...ml/default.asp
there's also a CD catalouge sample XML you can use... as your tutorial:
http://www.xml101.com/examples/cd_catalog.xml (requires: IE) | http://www.xml101.com/examples/
for more help visit: http://www.xml101.com/
Hope this answer you question
-
May 5, 2002, 18:35 #3
- Join Date
- Jan 2002
- Posts
- 420
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Is it possible to do it without ASP ?
Wavelan
-
May 5, 2002, 18:45 #4
- Join Date
- Nov 2001
- Location
- London, UK
- Posts
- 502
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
you can try it using MS XML NotePad.
http://msdn.microsoft.com/library/de...mlpadintro.asp
this is only free good XML tool I know off so far. its fairly easy to get used to as well.
XML Spy is best one but really expensive...
if you are looking fro somingthing like updateing from a HTML form then you'll need to know JavaScriting or VBScripting... and yes it is possible to do... bt requires lot of understanding of all the above.
-
May 5, 2002, 19:42 #5
- Join Date
- Jan 2002
- Posts
- 420
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
oh ok too advanced for me I think
Thanks anywayWavelan
-
May 6, 2002, 13:01 #6
- Join Date
- May 2002
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
php would work too
You could use php to do this. For example you could have a form that when you post, kills the last line and then appends text to an XML file. For example say you filled out an HTML form with this data:
artist:Brian Eno
title:Another Green World
track[1]:Sky Saw
track[2]:Over Fire Island
etc..
The php would take this data, kill the last line of the file (in this case </albumlist> which is the closing tag of the list) then writes something like this to the file:
<album>
<artist>Brian Eno</artist>
<title>Another Green World</title>
<track>
<title>Sky Saw</title>
</track>
<track>
<title>Over Fire Island</title>
</track>
etc...
</album>
</albumlist>
You could of course use a lot more information than this. Just loop through the track array like this
PHP Code:foreach ($track as $value){
if (!empty($value)){
print your track info to the file
}
}
-
May 6, 2002, 18:59 #7
- Join Date
- Nov 2001
- Location
- London, UK
- Posts
- 502
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by Wavelan
oh ok too advanced for me I think
Thanks anyway
-
May 6, 2002, 23:33 #8
- Join Date
- Apr 2002
- Posts
- 79
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
If you don't want to use (my)SQL for storage, you might want to try this thing out:
http://dbx.idya.net/
<i>DBX is essentially a full fledged database system.
It is completely written in PHP, and works using XML files as its native format. The database can be queried using standard SQL queries. DBX is the smallest, platform independent DBMS and is extremely easy to migrate to. For small databases, it is a good substitute for mySQL, Oracle, etc. The added advantage is that it saves the data as neat, readable, XML files - allowing easy compatibility.</i>
Bookmarks