ASP,XML,Message,Board,System,implemented,usin
Quick Search for:  in language:    
ASP,XML,Message,Board,System,implemented,usin
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
ASP/ VbScript Stats

 Code: 117,337 lines
 Jobs: 143 postings

 
Sponsored by:

 

You are in:

 
Login


 

 


Latest Code Ticker for ASP/ VbScript.
Click here to see a screenshot of this code!Ultimate Forum 2
By Gurgen Alaverdian on 6/1

(Screen Shot)

Speedy ASP Discussion Forum BBS
By ASPwebServer on 6/1


[[ Learn Database and ASP by Video ]]]
By Brian Link on 5/31


Generic XML Grabber
By Kevin O'Neill on 5/31


Block User to copy Links
By Shahid allauddin on 5/31


Click here to see a screenshot of this code!geographical search
By Igor Krupitsky on 5/31

(Screen Shot)

Click here to see a screenshot of this code!CDF/Active Desktop Example without ASP
By John on 5/30

(Screen Shot)

Click here to see a screenshot of this code!CDF/Active Desktop Example with ASP
By John on 5/30

(Screen Shot)

Date & Time Function
By Marc Ripin on 5/30


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

XML Message Board

Print
Email
 

Submitted on: 11/13/2000 12:07:30 PM
By: Jamie Band 
Level: Advanced
User Rating: By 5 Users
Compatibility:ASP (Active Server Pages)

Users have accessed this article 15639 times.
 
(About the author)
 
     A Message Board System implemented in ASP using XML/XSL. This articles serves to demonstrate the implementation of an XML system using ASP/MSXML-3/XSL

This article has accompanying files
 
 
Terms of Agreement:   
By using this article, you agree to the following terms...   
1) You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for langauges that allow it) freely and with no charge.   
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
An XML Messsage Board System

An XML Messsage Board System

by Jamie Band, Stimulus Software Architects

As part of my quest to learn more about XML and its associated technologies, I decided to implement an XML message board system. It serves as useful example to others learning the technology and to those who simply would like to incorporate a message board system into their website (without having to install an expensive SQL database).

The downloadable archive contains the following files:  

Default.htm The main page leading to others
Global.asa Contains application scope logic (loading XML doc)
Post.asp HTML form for entry of new messages
Reply.asp HTML form for entry of message replies
Viewmessage.asp ASP logic for displaying a single message
Viewmessage.xsl XSL stylesheet for displaying a singlemessage
Viewmessagelist.asp ASP logic for displaying hierarchical list of messages
Viewmessagelist.xsl XSL stylesheet for displaying hierarchical list of msgs
Submitmessage.asp ASP logic for inserting a message in the message tree
Messageboard.biz XML Schema for the messageboard.XML
Messageboard.xml XML file created by ASP logic to store messages

To install and run this XML application on your own system you will need:

  • An ASP enabled web server such as Internet Information Server
  • Microsoft’s XML parser (MSXML 3.0 beta and higher)

  You’ll need to configure your web server’s file write access permissions in the directory where you install the above files. This can be a little tricky in IIS so be sure read the IIS documentation to find out how.

  A message board system is suited to XML implementation, because it is inherently a hierarchical system.

<messageboard>       
            <group>
                        <message>
                                    <message>
                                    </message>
                        </message>
            </group>
<messageboard>

A message is contained within a message group. A reply to a message is neatly contained within its original message.  This simple structure is used to define a message tree. The entire message tree is stored in the XML flat file “messageboard.xml”.

  The information contained in the message tree is displayed in an appropriate format using XSL style sheets.  This example does not rely on the presence of an XML/XSL capable browser. It uses XSL processing on the server-side to output HTML for legacy browser compatibly. However the example could just as easily be modified to support XSL processing on the client.

  The root node (“messageboard”) in the XML message tree is constructed in the Application_OnStart method of global.asa supposing no messages have been posted.  The DOMDocument object is therefore defined at application-level scope, meaning that multiple users access the same document tree in memory.

Each message in the message board contains the following attributes:

            Subject = the subject of the message
            Nick = the nickname of the person who wrote the message
            Id = a unique identifier associated with the stored message
            PostDt =  the time and date when the message was posted           

  The file “submitmessage.asp” contains ASP the logic for inserting a message node into the message tree, in response to new post and reply to message operations. 

  The XSL stylesheets viewmessagelist.xsl, and viewmessage.xsl, display a list of hierarchical messages in a message group and the contents of a message, respectively.

  XSL parameters are used extensively, for example, to display a particular message associated with a message Id, the viewmessage.xsl stylesheet includes the tag:

  <xsl:param name="msgid"/>   

  The above msgid parameter is supplied prior to XSL processing in the ASP script:

xslproc.addParameter "msgid",CStr(id)
xslproc.transform

  where id contains the unique id of the message to be displayed.

  Message IDs are used to locate messages in the message board, using the nodeFromID() method available in the MSXML-2 XMLDOMDocument object.

  By far the most interesting style sheet is viewmessagelist.xsl. The style sheet displays the message hierarchy by recursively applying message templates and using the HTML DIV tag to format the output in an indented fashion.

  There are a number of useful extensions that can be added to this example, if you’re keen to beef up your XML expertise:

  • Implement a search function enabling users to find messages on the message board
  • Incorporate message count statistics for each message group
  • For each user (nick) supply information on which messages have been read / not read
  • Link up message groups from different sources (i.e. web sites)

I hope you find this example useful. If you have any questions or suggestions you can reach on jaband@mweb.co.za.

 

Jamie Band is a Systems Architect at Stimulus Software in Johannesburg, South Africa.

You can reach him on jaband@mweb.co.za or +27-83-412-5975

 

winzip iconDownload article

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzipto decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this article, you agree to the following terms...   
1) You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for langauges that allow it) freely and with no charge.   
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this article(in the Advanced category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
11/16/2000 10:57:32 AM:Michele
I downloaded this article & failed to receive Messageboard.xml, everything else was available. I tried a second time to be sure & again I didn't receive that one file. Could you please e-mail me the file messageboard.xml? Thank you. lady_of_plants@yahoo.com
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/10/2001 2:55:01 AM:J Kirby
A great use of XML but I could not view the messages when used with the latest production version of MSXML 3
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/17/2001 12:53:31 AM:donovan
got the same error when tryign to view messages, also using latest parser from M$ , but this is really an excellent example of coding thanks has been hard finding good examples of XML use server side *salutes you*
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/14/2001 11:22:39 AM:sylina
Downloaded the zip file but didn't see messageboard.xml. How can I get this file? thx
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/21/2001 11:06:43 PM:squirrel
haven't looked yet, but i am sure it is very spiffy
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/25/2001 12:27:58 PM:steve@netscribe.ca
I also am getting the error: Error Type: msxml3.dll (0x80004005) Required property does not have a valid value. /xmlmsg/viewmessage.asp, line 34 Would really like to try this out ...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/30/2001 10:50:42 AM:steve
I got this to work, simply by creating a virtual directory for it in IIS. If you don't do this, you get various misleading error messages. Works fine now. Thanks for the great code!!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this article has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular article, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | ASP/ VbScript Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.