![]() | |
![]() |
| | Thread Tools | Display Modes |
#21
| |||
| |||
|
|
On Dec 11, 3:53 pm, RobG <rg... (AT) iinet (DOT) net.au> wrote: I think the whole idea of using innerHTML as the source of valid XML markup is flawed. |
|
- Can you recommend a method which is a "better way" to take the html- contents of a DIV from an html file and put it into a database. (this html will be rendered on a page, so i need to make it well-formed.) |
|
I don't want implementation details, just a suggestion of having a better way. |
#22
| |||
| |||
|
|
Mahernoz wrote: On Dec 11, 3:53 pm, RobG <rg... (AT) iinet (DOT) net.au> wrote: I think the whole idea of using innerHTML as the source of valid XML markup is flawed. You did not write that; Rob did. Please learn how to quote properly. That is even possible with Google Groups; BTDT. Seehttp://jibbering.com/faq/pp. - Can you recommend a method which is a "better way" to take the html- contents of a DIV from an html file and put it into a database. (this html will be rendered on a page, so i need to make it well-formed.) You should first understand what are SGML, HTML, XML, and XHTML. HTML as an application of SGML does not need to fulfill XML's "well-formed" criterium, which is why there is XHTML which is HTML reformulated as an application of XML, which is a subset of SGML. However, MSHTML-based UAs do not support XHTML natively to date; they use the same old tag-soup parser for that, if, and only if served as text/html as opposed to the proper application/xhtml+xml (on which they choke). Hence the result you observe with `innerHTML'. I don't want implementation details, just a suggestion of having a better way. Serialize the document tree. PointedEars -- realism: HTML 4.01 Strict evangelism: XHTML 1.0 Strict madness: XHTML 1.1 as application/xhtml+xml -- Bjoern Hoehrmann |
#23
| |||
| |||
|
|
Hi Friends, I have got a valid XHTML Converter which solved my problem. This converter converts any HTML to XHTML (wellformed XML compatible) very easily. Please check out : http://www.eggheadcafe.com/articles/20030317.asp Very good converter. |
#24
| |||
| |||
|
|
Mahernoz said the following on 12/15/2007 12:31 AM: snip Hi Friends, I have got a valid XHTML Converter which solved my problem. This converter converts any HTML to XHTML (wellformed XML compatible) very easily. Please check out :http://www.eggheadcafe.com/articles/20030317.asp Very good converter. Not if ~85% of the web can't process XHTML as anything but tag soup. If you are going to do that, you may as well just use HTML4.01 Strict. -- Randy Chance Favors The Prepared Mind comp.lang.javascript FAQ -http://jibbering.com/faq/index.html Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/ |
#25
| |||
| |||
|
|
On Dec 15, 11:16 am, Randy Webb <HikksNotAtH... (AT) aol (DOT) com> wrote: Mahernoz said the following on 12/15/2007 12:31 AM: snip Hi Friends, I have got a valid XHTML Converter which solved my problem. This converter converts any HTML to XHTML (wellformed XML compatible) very easily. Please check out :http://www.eggheadcafe.com/articles/20030317.asp Very good converter. Not if ~85% of the web can't process XHTML as anything but tag soup. If you are going to do that, you may as well just use HTML4.01 Strict. i will need this on the admin site and the admin has a brand new firefox, so it won't be a problem. |
|
i am right now caught in a different soup. I want to copy the updated contents of a div(which has a table within which there are textbox and <select>) to another div. I am not able to copy the updated values of the textbox and <select> dropdowns, the copy happens perfectly well in Internet Explorer but not in Mozilla. |
![]() |
| Thread Tools | |
| Display Modes | |
| |