Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDOM: filter out Attributes from Document

 
Lukas Benberg
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i would like to filter out all attributes from a djom document.

<a val="1">
<b att="foo">
<b>
<c/>
</a>

should become:

<a>
<b>
<b>
<c/>
</a>

has anyone a hint how to do this?

thank you!
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do an XSLT identity transformation, and omit the part that copies attributes to the output.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic