none
processing files

    Question

  • Hi i was asked to do a simple program for my school projects where i need to processed a webserver log. I am really new and some functions i am not really familiar to work with.

    My webserver log are saved to .XML files

    In my program, I am required to have a browse function to select a file. (Which i already did) and my question is how do use the selected XML files so that i can processed it using programming C# inside the program itself

    Is it possible? Thanks for your reply

    Monday, April 10, 2017 12:54 AM

All replies

  • Using the code button, enter a small sample of the xml (and use the format combo box to format as xml). Without seeing the xml structure all we can do is provide various method to try but not a direct path to take.

    .


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Monday, April 10, 2017 1:42 AM
    Moderator
  • What you mean by "processing", is it just showing the content of the log file or doing some kind of an analysis?

    Monday, April 10, 2017 7:26 AM
  • Hi Aliff Z,

    Thank you for posting here.

    What browse function you used to select a file?

    If you use open file dialog, you could refer to the MSDN article OpenFileDialog Class.

    In the article, it show a example to select a file and read the stream. And then you could process it. Do something like add nodes or add attributes for xml or other thing you want.

    If I misunderstand what you want, please feel free to let me know.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Tuesday, April 11, 2017 7:45 AM
    Moderator