Hi guys,
Sorry for the cross-post but I got no response in the asp.net newsgroup.
I am trying to develop a mini e-learning application where the user provides
content for each page. Eventually, I'd like to shift to using templates but
at the moment the users is just entering content using html. Whats the best
way to allow the user to do this and whats the best way of ensuring the html
is valid before I store it in my database / xml document?
Cheers,
Peter Hardy 3 1535
The best way (and user-friendly too!) is to provide the user with an HTML
editor.
HTML is very lax and so everything goes. If you insist on users entering
markup, you may want to user XHTML 1.1 instead of HTML and validate the
input against http://www.w3.org/TR/2001/PR-xhtml11...#a_xhtml11_dtd
Hope this helps,
Mujtaba.
"Peter Hardy" <pe**@nospam.com> wrote in message
news:uS**************@TK2MSFTNGP15.phx.gbl... Hi guys,
Sorry for the cross-post but I got no response in the asp.net newsgroup.
I am trying to develop a mini e-learning application where the user
provides content for each page. Eventually, I'd like to shift to using templates
but at the moment the users is just entering content using html. Whats the
best way to allow the user to do this and whats the best way of ensuring the
html is valid before I store it in my database / xml document?
Cheers,
Peter Hardy
If the HTML that's imput is simple enough then you can write code to
walk the HTML DOM with Chris Lovett's SgmlReader [0]. That class will
also perform HTML to XHTML conversion [1].
HTH,
Christoph Schittko
MVP XML http://weblogs.asp.net/cschittko
[0] http://www.gotdotnet.com/Community/U...x?SampleGuid=B
90FDDCE-E60D-43F8-A5C4-C3BD760564BC
[1] http://eggheadcafe.com/articles/20030317.asp -----Original Message----- From: Peter Hardy [mailto:pe**@nospam.com] Posted At: Thursday, December 30, 2004 12:28 PM Posted To: microsoft.public.dotnet.xml Conversation: ensuring html is valid before storing it Subject: ensuring html is valid before storing it
Hi guys,
Sorry for the cross-post but I got no response in the asp.net
newsgroup. I am trying to develop a mini e-learning application where the user provides content for each page. Eventually, I'd like to shift to using
templates but at the moment the users is just entering content using html. Whats the best way to allow the user to do this and whats the best way of ensuring
the html is valid before I store it in my database / xml document?
Cheers,
Peter Hardy
Thanks for the advice guys. I bit the bullet in the end and bought the R.A.D
Editoe component whch allows users to create Xhtml. It's a very impressive
component and certainly worth a look.
Peter
"Christoph Schittko [MVP]" <IN**********@austin.rr.com> wrote in message
news:#3**************@TK2MSFTNGP09.phx.gbl... If the HTML that's imput is simple enough then you can write code to walk the HTML DOM with Chris Lovett's SgmlReader [0]. That class will also perform HTML to XHTML conversion [1].
HTH, Christoph Schittko MVP XML http://weblogs.asp.net/cschittko
[0] http://www.gotdotnet.com/Community/U...x?SampleGuid=B 90FDDCE-E60D-43F8-A5C4-C3BD760564BC [1] http://eggheadcafe.com/articles/20030317.asp
-----Original Message----- From: Peter Hardy [mailto:pe**@nospam.com] Posted At: Thursday, December 30, 2004 12:28 PM Posted To: microsoft.public.dotnet.xml Conversation: ensuring html is valid before storing it Subject: ensuring html is valid before storing it
Hi guys,
Sorry for the cross-post but I got no response in the asp.net newsgroup. I am trying to develop a mini e-learning application where the user provides content for each page. Eventually, I'd like to shift to using
templates but at the moment the users is just entering content using html. Whats the best way to allow the user to do this and whats the best way of ensuring the html is valid before I store it in my database / xml document?
Cheers,
Peter Hardy
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jayme Assuncao Casimiro |
last post by:
I am witing a wrapper to extract data from werb sites. I am storing the
data in xml format. But it doesn't produce valid xml because of html codes
like the above - typical of latin languages....
|
by: Lance |
last post by:
I have quite an odd question. Usually I ask whenever javascript is not
acting the way I'd expect. This time I'm trying to figure out why
something works when I don't think it should be working!
...
|
by: Kieran |
last post by:
I am designing a content management system and I want to make sure all pages
entered into it's database by users are using valid HTML. I have designed
the system to use HTML 4.01 Transitional...
|
by: Ed Jay |
last post by:
A complete js newbie is asking this question:
I have a form comprised of several questions, each answered with a radio
button. I'd like to use onClick to bring up additional text at the end of...
|
by: Peter Hardy |
last post by:
Hi guys,
I am trying to develop a mini e-learning application where the user provides
content for each page. Eventually, I'd like to shift to using templates but
at the moment the users is just...
|
by: Alan Silver |
last post by:
Hello,
I have read about the problems that IE has when using a doctype of HTML
4.01 Transitional. I was advised to use Strict wherever possible.
My question is, does the same apply to XHTML...
|
by: Chris Curvey |
last post by:
Hey all,
I'm trying to write something that will "fail fast" if one of my users
gives me non-latin-1 characters. So I tried this:
u'\x80'
I would have thought that that should have raised...
|
by: Simon Harris |
last post by:
Hi All,
I am trying to store an HTML string within an XML node, using:
Node.InnerText = strContent
Problem is, the HTML ends up like this, when its in the XML:...
|
by: =?Utf-8?B?Z3V5?= |
last post by:
Is this a valid approach to State Management?
What I do is define a class 'State' which holds all the objects etc. that I
need to store in the Session.
I can then get my state object and...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |