aspose file tools*
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 Spring in Action this week in the Spring 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?