EDN Admin
Well-known member
Im new in programming. I decided to make 2d online game. I read first players location from uri:
<span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small <font face="Consolas" size="2" color="#2b91af <font face="Consolas" size="2" color="#2b91af <font face="Consolas" size="2" color="#2b91af
String
</font></font></font><font face="Consolas" size="2" color="#2b91af <font face="Consolas" size="2" color="#2b91af
</font></font><font face="Consolas" size="2" color="#2b91af
</font>
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small URLString =
<span style="font-family:Consolas; color:#a31515; font-size:x-small <span style="font-family:Consolas; color:#a31515; font-size:x-small <span style="font-family:Consolas; color:#a31515; font-size:x-small "http://localhost/books.xml"<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small ;<font face="Consolas" size="2 <font face="Consolas" size="2
</font></font><font face="Consolas" size="2
</font>
<span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small XmlDocument<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
doc = <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small new<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small XmlDocument<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small ();
doc.Load(URLString);
<font face="Consolas" size="2 <font face="Consolas" size="2
</font></font><font face="Consolas" size="2
</font>
<span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small XmlElement<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
root = doc.DocumentElement;<font face="Consolas" size="2 <font face="Consolas" size="2
</font></font><font face="Consolas" size="2
</font>
<span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small XmlNodeList<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
nodes = root.SelectNodes(<span style="font-family:Consolas; color:#a31515; font-size:x-small <span style="font-family:Consolas; color:#a31515; font-size:x-small <span style="font-family:Consolas; color:#a31515; font-size:x-small "/Location"<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small );<font face="Consolas" size="2 <font face="Consolas" size="2
</font></font><font face="Consolas" size="2
</font>
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small string<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
pos1 = nodes[0].Attributes[<span style="font-family:Consolas; color:#a31515; font-size:x-small <span style="font-family:Consolas; color:#a31515; font-size:x-small <span style="font-family:Consolas; color:#a31515; font-size:x-small "player1x"<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small ].Value;
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small Then I created next xna project and created sprite. when I move that sprite, I want its X coordinate to replace player1x value in books.xml. I cant
do it with xmltextwriter, because it doesnt support uri format. here is my books.xaml:
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small <span lang="EN
<FirstName player1x="44" player1y="55 </FirstName>
I want that value 44 changed permanently with my sprites X coordinate.
sorry for my english. please help if its possible
View the full article
<span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small <font face="Consolas" size="2" color="#2b91af <font face="Consolas" size="2" color="#2b91af <font face="Consolas" size="2" color="#2b91af
String
</font></font></font><font face="Consolas" size="2" color="#2b91af <font face="Consolas" size="2" color="#2b91af
</font></font><font face="Consolas" size="2" color="#2b91af
</font>
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small URLString =
<span style="font-family:Consolas; color:#a31515; font-size:x-small <span style="font-family:Consolas; color:#a31515; font-size:x-small <span style="font-family:Consolas; color:#a31515; font-size:x-small "http://localhost/books.xml"<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small ;<font face="Consolas" size="2 <font face="Consolas" size="2
</font></font><font face="Consolas" size="2
</font>
<span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small XmlDocument<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
doc = <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small new<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small XmlDocument<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small ();
doc.Load(URLString);
<font face="Consolas" size="2 <font face="Consolas" size="2
</font></font><font face="Consolas" size="2
</font>
<span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small XmlElement<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
root = doc.DocumentElement;<font face="Consolas" size="2 <font face="Consolas" size="2
</font></font><font face="Consolas" size="2
</font>
<span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small <span style="font-family:Consolas; color:#2b91af; font-size:x-small XmlNodeList<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
nodes = root.SelectNodes(<span style="font-family:Consolas; color:#a31515; font-size:x-small <span style="font-family:Consolas; color:#a31515; font-size:x-small <span style="font-family:Consolas; color:#a31515; font-size:x-small "/Location"<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small );<font face="Consolas" size="2 <font face="Consolas" size="2
</font></font><font face="Consolas" size="2
</font>
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small string<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
pos1 = nodes[0].Attributes[<span style="font-family:Consolas; color:#a31515; font-size:x-small <span style="font-family:Consolas; color:#a31515; font-size:x-small <span style="font-family:Consolas; color:#a31515; font-size:x-small "player1x"<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small ].Value;
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small Then I created next xna project and created sprite. when I move that sprite, I want its X coordinate to replace player1x value in books.xml. I cant
do it with xmltextwriter, because it doesnt support uri format. here is my books.xaml:
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small <span lang="EN
<FirstName player1x="44" player1y="55 </FirstName>
I want that value 44 changed permanently with my sprites X coordinate.
sorry for my english. please help if its possible
View the full article