This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Generating an xlink attribute in JDOM? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Generating an xlink attribute in JDOM?" Watch "Generating an xlink attribute in JDOM?" New topic
Author

Generating an xlink attribute in JDOM?

K Riaz
Ranch Hand

Joined: Jan 08, 2005
Posts: 375
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

Joined: Jun 03, 2000
Posts: 5040
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


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
K Riaz
Ranch Hand

Joined: Jan 08, 2005
Posts: 375
Well I managed to solve it by using namespaces. The XML under question is not under my control!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Generating an xlink attribute in JDOM?
 
Similar Threads
xlink-problem
xsd of xlink elements
append an element to a text node using jdom?
XLink aware browser..
Basic question on Xlink