• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Tim Cooke
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
Saloon Keepers:
  • Piet Souris
Bartenders:

reading and writing with xml in java

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.



 
Rancher
Posts: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic