How to update data to XML ?

db , xml Cambodia
  • 13 years ago

    Hello all programmer pls help me !

    give me a small procedure how to update data to xml ?

    i wait for your relpy na..

     

  • 13 years ago
    Hi Spider
     I hope this follwoing links may solve your problem

     http://www.codeguru.com/vb/gen/vb_database/adonet/article.php/c5153/
     http://www.vbdotnetheaven.com/UploadFile/mahesh/XMLusingVbDotNet04222005015518AM/XMLusingVbDotNet.aspx
     http://snippets.dzone.com/posts/show/1975



     Regards
     Hari K......







  • 13 years ago

    Oh ! Thanks khari6579 na

    You are always near me..Smiley Face [:)]

    let's drink with me ..Beer [B]

    good luck to you ..

     

  • 13 years ago

    Hello if every one want to update data to xml pls read below code:

    my xml table

    ----------------------------------------

    <NewDataSet >

    <Table  >

    <ID >10</ID >

    <MainWord >antha</MainWord >

    <MeanWord >go any where </MeanWord >

    <VoicePath><VoicePath>

    <Spelling>Anaathaa</Spelling>

    </Table>

    <NewDataSet >

    ----------------------------------------

    Dim

    xdoc As New XmlDocument()

    xdoc.Load(application.StartupPath & "\KHDic.xml")

    'select specific node to update

    Dim

    nod As XmlNode = xdoc.SelectSingleNode("/NewDataSet/Table[ID=" & TxtID.Text & "]")

    If nod IsNot Nothing Then 

    Dim Str$ = clsEn.EnCrypt("ទោះអំពើល្អក្ដី អាក្រក់ក្ដី ក៏ហៅថា កម្ម (កម្មជាកុសល, កម្មជាអកុសល): ទទួលកម្",TxtSpelling.Text)

    nod.ChildNodes(0).InnerText = TxtID.Text

    nod.ChildNodes(4).InnerText = Str

    End If ' Save the Xml.

    xdoc.Save(m_application.StartupPath & "\KHDic.xml")

     

     

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“I invented the term Object-Oriented, and I can tell you I did not have C++ in mind.” - Alan Kay