Suggestions for an indenter for an HTML writer
Posted: Fri Jul 15, 2005 11:31 am
I have a problem with some code I'm working on. When the XHTML in a gallery project I have been working on became too complex, I decided that I should start again, but this time with an HTML writer class. What I want to achieve is automatic indentation and a memory of it every time a new tag is opened. I think I can do this by incrementing every time an open function is called and decrementing every time a close function is called.
Here is the problem, I don't know how to create blank spaces which are dependent on an integer. (int = 1, 1 space etc). Does anyone know how I might go about this? (or any better ideas to what I'm trying to do)
Here is the problem, I don't know how to create blank spaces which are dependent on an integer. (int = 1, 1 space etc). Does anyone know how I might go about this? (or any better ideas to what I'm trying to do)