xml NOT to file

  • Thread starter Thread starter Djunk
  • Start date Start date
D

Djunk

Hi

I'm about to build the part of my application where i need to send data
between client + server

Instead of just throwing about strings such as

username:user1|sendto:user2|message:hello

i would like to send it as XML

as in

<msg>
<username>user1</username>
<sendto>user2</sendto>
<message>hello</message>
</msg>


I am new to XML in vb - can anyone explain the VERY basics of how i would
create that bit of xml i just gave as an example, or provide a link to a
decent example

I dont want to save the XML into a file, but instead would like to send it
over a TCP connection
that I have already established - i was hoping there would be some XML
object of which I could call
something like the tostring method, thus prividing me with the XML i have
built up as text.

It would be lovely if someone could also explain the very basics of how on
the
other end I would also parse this XML.

thnakyou

djunk
 
ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfSystemXml.htm

That contains everything XML in .NET

Sounds like you may wnat XML.Writer:

ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfsystemxmlxmlwriterclasstopic.htm

In fact this page here does eactly what you want:

ms-help://MS.VSCC/MS.MSDNVS/cpguide/html/cpconwritingxmlwithxmlwriter.htm

that is:

XmlTextWriter.
Input

data1|data2|data3|data4|data5
and you would like to transform it to :

Output

<data>
<item> data1 </item>
<item> data2 </item>
<item> data3 </item>
<item> data4 </item>
<item> data5 </item>
</data>

HTH,
Matt
 
thanks, i been hanging around for 3 days not knowing what to do, not being
able to find anything through google - im going to check out that
information and if it works i think you could well be up for an award
 
Back
Top