How to Append NODE to XML File in ASP.NET with C#..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Aswanth
    New Member
    • Feb 2008
    • 14

    #1

    How to Append NODE to XML File in ASP.NET with C#..

    I'm Using Asp.Net with C#.. & Using XML Files..

    Please check this..


    <Page_Details >
    <Page="HomePage .aspx" Time="10:30:20: 32636" Type="S" ID = "1" Category_ID="41 " />
    <Page="HomePage .aspx" Time="10:30:20: 32636" Type="B" ID = "4" Category_ID="56 " />
    <Page="HomePage .aspx" Time="10:30:20: 32636" Type="B" ID = "8" Category_ID="59 " />
    <Page="HomePage .aspx" Time="10:30:20: 32636" Type="S" ID = "1" Category_ID="44 " />
    </Page_Details>

    Now I want to Write a Function.... Like

    Create_Page(str ing Page_Name, string Time, string Type, string ID, string Sub_Category_ID )
    {

    --------------------
    -------------------
    }

    a) Above function should check if the xml file exists,
    If exists, Append Node to the existing file (like "<Page="HomePag e.aspx" Time="10:30:20: 32636" Type="S" ID = "1" Category_ID="41 " />")
    if file not exists cretae a new file with the current date and append node to it


    How to Do this..


    Thank You
  • pronerd
    Recognized Expert Contributor
    • Nov 2006
    • 392

    #2
    Since this question is really about ASP.NET and C#, not XML, it should be posted in a forum that covers those topics.

    Comment

    Working...