Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] getting rid of bold nodes from a parsed xhtml Document

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Lowell Kirsh" <lowellk AT gmail.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] getting rid of bold nodes from a parsed xhtml Document
  • Date: Mon, 6 Oct 2008 20:32:16 -0700

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




Archive powered by MHonArc 2.6.24.

Top of Page