Re: HELP! I am new to JDOM, can I create and read XML documents that contains Japnese characters? Please reply soon, URGENT!! Thanks!

Jason Hunter <[email protected]>
Newsgroups gmane.comp.java.jdom.general
Message-ID <[email protected]>
> 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:

<word><english>apple</english><japanese>ringo</japanese></word>

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

-jh-
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.