[jdom-interest] Using JDOM to manipulate HTML

Eric Ace ACE at rdacorp.com
Tue Feb 12 13:28:28 PST 2002

I want to use JDOM to manage presentation. Instead of using custom tags a la Struts, my thought is to have a presentation tier that queries business components and merges data into static HTML via JDOM. So, I need to be able to locate specific HTML elements by name or ID and modify them. For example:
<table id="tbl1">
<!-- Use Presentation component + JDOM to insert rows -->
I can ultimately get to the table I need to manipulate by getting all "table" elements, then looking for one that contains an ID attribute. What would be more programmatically clean though would be to manipulate the document via JDOM similarly to how I can via the DOM in JavaScript.
Am I completely missing the spirit of JDOM? Or, missing some fundamentally obvious point?

More information about the jdom-interest mailing list