[XOM-interest] getting rid of bold nodes from a parsed xhtml Document
Lowell Kirsh
lowellk at gmail.com
Mon Oct 6 23:32:16 EDT 2008
I have parsed some xhtml into a Document and I want to get rid of all
bold text. What's the best way to do this? I was thinking I could do a
post order traversal of the tree from the root and every time I pass a
node which represents a <b> element, I could replace it with a <span>
element whose contents are copied from the <b> element. But I'm
guessing there's a better solution out there. Is there?
Thanks,
Lowell
More information about the XOM-interest
mailing list