This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Generating an xlink attribute in JDOM?

 
K Riaz
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I produce the following simple XML with JDOM:



I tried the usual way of adding attributes in JDOM:


But Java doesn't like the semicolon between xlink and href.

Any ideas?
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure if its a Java thing....colon's in attribute names don't go very well with XML. I am not very familiar with JDOM, hence the 'not sure'.

- m
 
K Riaz
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I managed to solve it by using namespaces. The XML under question is not under my control!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic