File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

reading and writing with xml in java

 
sina poores
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sina poores
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you asked him/her how using XML would improve the system? That is far from obvious to me.
 
sina poores
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic