redho home | products | services

Programming Forums


Community for Java, PHP, Perl C, ASP and Python programmers

Ask your IT question here

how to save formatting



 
Post new topic   Reply to topic    Programming Forums -> JavaScript forum
View previous topic :: View next topic  
Author Message
Roombor
Enthusiastic Coder


Joined: 02 Jun 2006
Posts: 111
Hello, I've inherited some code that uses the DOM extensively.
However, all formatting is lost - how can I attempt to preserve formatting?
(How do I get and set arbituary formatting on a node?)
Ie, how do I get nodeOne to get all the formatting from nodeTwo?
Is what I'm asking even making sense?

Reply with quote
 
Peter Pitt
Enthusiastic Coder


Joined: 20 May 2006
Posts: 114
Location: Egypt
Roombor how are you copying the nodes?
Reply with quote
 
Roombor
Enthusiastic Coder


Joined: 02 Jun 2006
Posts: 111
It appears that the code splits the node's text, and makes a new node using the document, and handles it that way.
It essentially just gets the text from the node and discards the original.
Splitting it first, because it's adding something in the middle (more text)
Does getting the text from the node "flatten" the structure as neccessary? I'm used to SAX, not DOM.

Reply with quote
 
Page 1 of 1
Post new topic   Reply to topic    Programming Forums -> JavaScript forum


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group