Well, that took a while but I have the contents of text nodes now showing if you are at db6. - I bring in the tidybuffio.h so that I can make a TidyBuffer - I bring in a TidyBuffer because the tidyNodeGetText routine puts its output in one. - Unlike tidyDoc, it seems as though in order to free a TidyBuffer, you must test for null. Otherwise the program seg faults, based on a thread I was reading. I have a phrasing at the end of the routine for how to know whether it is safe to call tidyBufFree. I test the .size. I'm not sure if this is correct- does anyone know? It wouldn't let me compare the TidyBuffer object with null. - The mechanics of the node traversal, I brought in from the Tidy example as well as other snippets of work. So I introduced two routines from the sample code: dumpBody and dumpNode. I placed them just after encodeTags. - Why do they hardcode those first several cases when they are switching on the node name? I assume it is something to do with the laws of the W3C spec? Like, are these branches that terminate, so you don't have to worry about additional levels? Anyway, I left them alone. Over to you! I'm sure this will raise some fertile issues in what to do from here. I hope there will not be \r introduced into this attachment. If there is, the email client is ruled out as a culprit, and I'll worry about other causes. thanks Kevin