PDA

View Full Version : XML Database...


DELOCH
06-28-2006, 12:17 AM
I would like to create an XML database which seems to be possible in my opinion, due to it being to be able to be use in HTML

such as:

XML file (database.xml):

<DATABASE>
<USER>
<NAME>Username1</NAME>
<PASS>********</PASS>
<ID>1</ID>
</USER>
</DATABASE>


HTML:

<body>
<xml id='database' src='database.xml'></xml>
<table border="1" datasrc='#database'>
<thead>
<tr>
<td>ID</td>
<td>Username</td>
<td>Password</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<span datafld='ID'></span>
</td>
<td>
<span datafld='NAME'></span>
</td>
<td>
<span datafld='PASS'></span>
</td>
</tr>
</tbody>
</table>
</body>

and this makes a table with IDs USERNAMEs and PASSWORDs

but can i use anything to query the database on form submition?

such as when you submit but controlling with client side script... even though it is dangerous...

I know there is XQuery but W3Schools never specified where to embed it or how to embed it... or how to even use Server Side Script how to query XML...

I just like using XML and using it as simple database maker would be nice...

asearle
06-28-2006, 10:53 AM
Hi Deloch,

Here's the URL to an interesting tutorial showing how to use XSL as a (HTML) front-end to XML. This (combined with a little javascript) allows you to query and display the data.

Here's the link ...

http://www.bayes.co.uk/

... then go to tutorials (client side filtering).

All the best with that.

Cheers,
Alan.

DELOCH
06-30-2006, 06:26 AM
it did not help :\ or i did not find anything I need :\

Thanks though :)