Win a copy of Mesos in Action this week in the Cloud/Virtualizaton 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