okay, but I have a simpler question, how can I split using only "\n"? I try this: strings = node.data.split("\n"); print node.data for str in strings: print str where node.data has multiple lines, but in the for loop, I don't see str gets print out.