   | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Struts - A MVC web framework | | Tomcat - JSP/Servlet container | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | | JSP - A mailing list about Java Server Pages specification and reference | |
Struts & Hibernate
|
|
|
  | |  | Using xml prefix for an attribute | Using xml prefix for an attribute 2003-11-25 - By Morten
Back
Hi.
I'm serializing some data to TMX (an XML based format), which requires an attribute in the xml NS, eg. xml:lang="de". I've tried the following:
Element e = new Element("elem"); e.setAttribute("lang", "de", Namespace.getNamespace("xml","http://www.xml.org/"))
But the JDOM complains:
[sauron]~>java test Exception in thread "main" org.jdom.IllegalNameException : The name "xml" is not legal for JDOM/XML Namespace prefixs: Namespace prefixes cannot begin with "xml" in any comb ination of case. at org.jdom.Namespace (Namespace.java:154) at test.main(test.java:12)
What to do..?
Thanks in advance,
Morten
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ To control your jdom-interest membership: http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@(protected) .com
Earn $52 per hosting referral at Lunarpages.
|
|
 |