|
||
| Inside Technique : XML Poetry This demonstration uses XML, Data Binding, and Dynamic HTML to create a virtual dynamic poetry application. XML Poetry allows you to drag and drop a "poem" from a set of words and submit it to the server. Your poem is immediately published for viewing on the web. This application uses 2 XML files, one for defining the word list, and a second file for storing the poems. The list of words is stored in a very simple XML file: <WORDLIST> <WORD>HTML<\WORD> <WORD>XML<\WORD> ... <\WORDLIST> The list of words is downloaded to the XML parser on the client. On the client, Dynamic HTML is used to position each word and to allow the user to drag and drop the words onto the virtual refrigerator. Once you finish writing your poem, you submit it back to the server. At the server, the poem is inserted into the XML Poetry file. This XML file stores the author and the complete poem in the following format:
<POETS>
<POET>
<NAME>Author Name</NAME>
<WORDS>
<WORD X="20" Y="20">Words>/WORD>
...
</WORDS>
</POET>
</POETS>
The IE4 required to write and read poems Page 1:XML Poetry © 1997-2000 InsideDHTML.com, LLC. All rights reserved. |