1 Reply Latest reply: Dec 25, 2006 1:25 AM by 807599 RSS

    need some logic on xml file

    807599
      hello guys,
      i am a old member of this forum but my stream is c but meanwhile i give some time to this fascinating language....
      guys i need ur comment on this problem how it can be solved .. i am hoping ur answers (plz don't say i didn't try it just give me direction)

      problem is as:
      find below a detailed scenario of transferring data from the client to the server.
      The data is transferred using XML A sample xml format for transferring employee data is
      shown below
      <first name>xyz</first name>
      <surname>abc</surname>
      <mobile>12345 67890</mobile>
      To transfer the data , we first write this xml as a file with a predefined name on the client
      pc's temp folder. Covert the file into a string and send it to the server and re-convert the
      string into an XML FILE and read it. We have four modules namely Module 1, Module
      2, Module 3, Module 4 in the application.
      Problems faced:
      1) Currently for every set of information passed, we write an xml file and this sometimes
      hogs memory space. At the same time we cannot delete these files since we need to
      understand any data related errors.
      2) All the files are written with the name in the format "project_abc_<time stamp>".
      However this file name is quite long and prevents us from legibly understanding when
      the file was created and why. Moreover we have just deployed the application to a new
      operating system, which prevents us from creating a file with a file name whose length is
      more than 18.
      3) Moreover there is no way currently to identify which module created the xml file and a
      facility to do that would be helpful for the support team.
      4) I also would like to inform the server side function whether the data I am passing is to
      be inserted or updated. Currently I inform the server side by hardcoding the string
      ?INSERT? or ?UPDATE? in my xml. This needs to be changed
        • 1. Re: need some logic on xml file
          807599
          To transfer the data , we first write this xml as a file with a predefined name on the client
          pc's temp folder. Covert the file into a string and send it to the server
          [B]

          seems like a waste to me. Why not just write the xml directly to a String, using a StringWriter.