wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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: 41180
    
  45
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: 41180
    
  45
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: 41180
    
  45
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).
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: reading and writing with xml in java
 
Similar Threads
Tennis score keeping program
Can cny one help me in making java media player
Urgent -- How to open video or audio player through a GUI ?
Creating A Multi Player Game With Java
XML beginner need advice please