[jdom-interest] / character in data

Richard Cook rpc at prismtechnologies.com
Fri Jul 13 04:48:21 PDT 2001


at the risk of using a controversial method, looks like you are calling new
Element("/users/..")
new Element("location").setText("/users/...") works for me.


-----Original Message-----
From: jdom-interest-admin at jdom.org [mailto:jdom-interest-admin at jdom.org]On
Behalf Of Iain Darroch
Sent: 13 July 2001 12:27
To: jdom-interest at jdom.org
Subject: [jdom-interest] / character in data


Hi,

I wish to store the full path to a program in XML

I do this with the following

...

<location>/users/myname/mydir</location>

....

However I get the following exception raised

org.jdom.IllegalNameException: The name "/users/myname/mydir" is not legal
for JDOM/XML elements: XML names cannot begin with the character "/".
        at org.jdom.Element.setName(Element.java, Compiled Code)
        at org.jdom.Element.<init>(Element.java, Compiled Code)
        at org.jdom.Element.<init>(Element.java, Compiled Code)


Has anyone else had the same problem?  As far as I was aware all parsers
whould allow this.  Does anyone have a solution?

many thanks

Iain

---------------------------
Iain Darroch


"If you had to identify, in one word, the reason why the human race has not
achieved, and never will achieve, its full potential, that word would be
"meetings."


"No man is an Island unless his name is Jura"

_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com




More information about the jdom-interest mailing list