This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes I/O and Streams and the fly likes reading and writing with xml in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "reading and writing with xml in java" Watch "reading and writing with xml in java" New topic
Author

reading and writing with xml in java

sina poores
Greenhorn

Joined: Jul 07, 2011
Posts: 20
i am designing a game that 2 player play with wlan.i should mange them with xml.so that when

in a side a player press a buttun i write buttun name on xml and in onother side other plaer

can read key character on xml.

but i don't know how i can start and which classes in java can help me?please help me or advise

me some good totourial.

thanks alot.



Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41586
    
  54
What does "managing a game with XML" mean? Do the two sides communicate by sending XML between them somehow? If so, what advantage do you see in using XML vs. sending the raw character over a socket connection? It seems a complication of dubious benefit.

If the two sides know each other's IP addresses, then you can use sockets for communication. If they don't, things get more complicated.


Ping & DNS - my free Android networking tools app
sina poores
Greenhorn

Joined: Jul 07, 2011
Posts: 20
thanks for answer..
yes you are right.now i am using socket but my employer said improve the system with xml reading and writing!!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41586
    
  54
Have you asked him/her how using XML would improve the system? That is far from obvious to me.
sina poores
Greenhorn

Joined: Jul 07, 2011
Posts: 20
he said we can't cry overkill of output and input stream .i am not sure that xml decrease the overhead but it is not far of mind.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41586
    
  54
I don't understand what the first sentence is supposed to mean. XML will certainly have much higher overhead than just sending bytes over a socket (which has just about no overhead).
 
jQuery in Action, 2nd edition
 
subject: reading and writing with xml in java