Search the web
Sign In
New User? Sign Up
tdom · tDOM - fast DOM / XPath for Tcl in C
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Problem with XHTML   Message List  
Reply | Forward Message #1435 of 1983 |
Hello!

I have a problem with tDOM. I want to use tDOM to build the XHTML
structure. Assuming I have well-formated xhtml_string and I want to
add new node eg. empty textarea. This is the example:

set doc [dom parse $xhtml_string]
set root [$doc documentElement]

#Add new textarea
$root appendChild [$doc createElement "textarea" textarea_node]

And now I have a problem. While I return xhtml_string asXML parser
remove empty tags eg: <textarea/>
but when I return xhtml_string asHTML parser change well-formated tags
eg <br/> ==> <br>

What should I do in order to receive the well-formated xhtml_string?




Thu Mar 1, 2007 8:33 am

amagnol
Offline Offline
Send Email Send Email

Forward
Message #1435 of 1983 |
Expand Messages Author Sort by Date

Hello! I have a problem with tDOM. I want to use tDOM to build the XHTML structure. Assuming I have well-formated xhtml_string and I want to add new node eg....
amagnol
Offline Send Email
Mar 1, 2007
8:33 am

... Without having tested; try [dom parse -keepEmpties] option. You may need to create an empty text node as child for your new textarea too. kind regards -- ...
Matthias Kraft
matzek
Offline Send Email
Mar 1, 2007
11:31 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help