Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

writing to an XML database (newbie q's)

Status
Not open for further replies.

decide2kx

Technical User
Joined
May 3, 2004
Messages
1
Location
US
I'm in the need of a database that holds user information (in this case for say a game roster) in which the user can enter his/her own information, save the information to an XML database, and have the information display on a roster page in HTML. I've already figured out multiple ways to extract information from the database and reproduce it in XHTML, however the one thing I cannot 100% figure out is how to write to the XML database and have it save in a fairly easy manner. I'm not looking for any large complicated script, anything simple will do. Reading through tutorials and articles online I understand ADO can do this, but mind you i'm only a beginning programmer and reading through code for the first time with no great beginners explanations doesn't help me much. I know there are other ways to write to the XML document/database, but again I haven't found a fairly easy solution to suit my needs. If anyone has any reccomendations as to how to create a form to which the user can post and save his/her roster information to the XML database that would be appreciated. Thanks!
 
First off, XML makes a really poor database.

If you really really want to do this:
Add your elements to a DOMDocument, then use the .Save method to write it to disk. Use the .Load method to read it from disk.

Did I mention it makes a poor database? It's because you have to read the entire file into memory in order to find something. Once you get over a couple of hundred "records", perfomance really goes to the dogs.

Maybe this will meet your needs. If it doesn't look at downloading MSDE (desktop edition of SQL Server). It's available free from Microsoft to anyone who bought Visual Studio (v6 or .NET).

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top