How To Insert/Delete/Update Data From File XML Available ? RRS feed

  • Question

  • Hi everyone !

    I started writing windows applications on the phone
    Can anyone tell me how to insert / delete / update data in xml file is available or has been made ​​available to me in the project. I hope people help !.If source code include with project is very good.Thank!

    • Moved by Jesse Jiang Tuesday, May 31, 2011 8:42 AM (From:Windows Mobile Development)
    Sunday, May 15, 2011 10:26 AM

All replies

  • 1. Read file content into memory, e.g. LINQ XDocument or DOM.

    2. Insert / delete / update data in memory.

    3. Overwrite XML file from in memory document.

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Sunday, May 15, 2011 5:20 PM
  • This is my xml file name "book.xml"

    <?xml version="1.0" encoding="utf-8" ?>
      <book id="bk102">
        <author>Ralls, Kim</author>
        <title>Midnight Rain</title>
      <book id="bk107">
        <author>Thurman, Paula</author>
        <title>Splish Splash</title>

    id, author, title, price imported from textbox txtid, txtauthor, txttitle, txtprice

    I have a lot of searching online but most just insert / update / delete file "book.xml" in isostorage.I want when I insert / delete / update, it will save content directly into my file "book.xml. "Can you give me sample code to reference it? Thank!

    Ah I'm programming on windows phone 7
    Monday, May 16, 2011 4:04 AM
  • Hello,


    I think your issue should be raised in the Windows Phone 7 Forum. I believe they will know more information of this issue than us, and I will move this one to off-topic.


    Thanks for your understanding,


    Best regards,


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, May 31, 2011 8:41 AM