Xml Component

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ron Vecchi

    #1

    Xml Component

    Hi all,


    Is there any examples or tutorials out there on making a component that
    manages an Xml docuemnts. As far as SELECTING DELETING UPDATING and
    INSERTING data to and from. Similar to querying a database through sql.

    I am looking to create a component to wrap up some of the coding needed to
    perform these queries.
    Any one try this or know of some examples?


    Thanks,
    Ron Vecchi


  • Michael Mayer

    #2
    Re: Xml Component

    What about using a DataSet?

    DataSet ds = new DataSet();
    ds.ReadXml("xml file");
    update, select, delete, etc from dataset...
    ds.WriteXml("xm lfile");

    Granted, if you have more than one process running, you'll have some
    problems in terms of other updates to the xml file. But if you are looking
    for concurrent access, a database would be far preferable anyway.

    --
    Mike Mayer

    mike@mag37.com


    "Ron Vecchi" <vencenzo@comca st.net> wrote in message
    news:Og5eSnKeDH A.1824@TK2MSFTN GP10.phx.gbl...[color=blue]
    > Hi all,
    >
    >
    > Is there any examples or tutorials out there on making a component that
    > manages an Xml docuemnts. As far as SELECTING DELETING UPDATING and
    > INSERTING data to and from. Similar to querying a database through sql.
    >
    > I am looking to create a component to wrap up some of the coding needed to
    > perform these queries.
    > Any one try this or know of some examples?
    >
    >
    > Thanks,
    > Ron Vecchi
    >
    >[/color]


    Comment

    • Ron Vecchi

      #3
      Re: Xml Component

      I was continplating creating a shopping cart program for web use and I don't
      want to rely on the shared hosting account having a database. I would
      rather do it in XML. But yes a DataSet does seem like a good idea. I will
      need to implement a Mutex around Inserts, Updates, and Deletes though.

      My question is does the WriteXml() method rewrite the whole document over
      the old one or does it just make changes in the document where changes in
      the dataset are made?


      Thanks
      Ron Vecchi


      "Michael Mayer" <mike@mag37.com > wrote in message
      news:uwyIbEPeDH A.1820@TK2MSFTN GP10.phx.gbl...[color=blue]
      > What about using a DataSet?
      >
      > DataSet ds = new DataSet();
      > ds.ReadXml("xml file");
      > update, select, delete, etc from dataset...
      > ds.WriteXml("xm lfile");
      >
      > Granted, if you have more than one process running, you'll have some
      > problems in terms of other updates to the xml file. But if you are[/color]
      looking[color=blue]
      > for concurrent access, a database would be far preferable anyway.
      >
      > --
      > Mike Mayer
      > http://www.mag37.com/csharp/
      > mike@mag37.com
      >
      >
      > "Ron Vecchi" <vencenzo@comca st.net> wrote in message
      > news:Og5eSnKeDH A.1824@TK2MSFTN GP10.phx.gbl...[color=green]
      > > Hi all,
      > >
      > >
      > > Is there any examples or tutorials out there on making a component that
      > > manages an Xml docuemnts. As far as SELECTING DELETING UPDATING and
      > > INSERTING data to and from. Similar to querying a database through sql.
      > >
      > > I am looking to create a component to wrap up some of the coding needed[/color][/color]
      to[color=blue][color=green]
      > > perform these queries.
      > > Any one try this or know of some examples?
      > >
      > >
      > > Thanks,
      > > Ron Vecchi
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...