[jdom-interest] HELP! I am new to JDOM, can I create and read XML documents that contains Japnese characters? Please reply soon, URGENT!! Thanks!

Jason Hunter jhunter at servlets.com
Sun May 20 11:07:50 PDT 2007

> 1)Does  JDOM recognise and create an XML document containing Japanese 
> characters, specifically Hiragana? How will I go about this?

JDOM is based on Unicode characters, so that will work so long as the 
characters are supported in Unicode.

> 2) Can I create an XML document using JDOM, that will enable me to have an
> "EqualsTo" function  for each word. For example, "apple" in Japanese is 
> "ringo" so:

You can create any XML document you like in JDOM.  I don't follow what 
you mean by an EqualsTo function.

> <word>apple = ringo <word>

I'd probably do that this way:


That makes the two words easier to fetch out.

> 3) Also, if a string input (which would be a word of Japanese or 
> English) from a Java GUI is entered, that string input could be compared 
> to the list of words in the XML document and return the value it equals 
> to. For example, if the user enters "apple" in a JTextfield, it will 
> return the value "ringo"

You could do that with XPath.

//word[english = "apple"]/japanese


More information about the jdom-interest mailing list