Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Creating and saving a new XML File

xml

  • Please log in to reply
3 replies to this topic

#1 gibsray

gibsray

    CC Newcomer

  • Member
  • PipPip
  • 10 posts
  • Programming Language:C, C#, Assembly
  • Learning:C, C#, Assembly

Posted 13 October 2012 - 08:10 AM

Hi
I need help with XML files in C#. How do I create a new file and then save it in the path that the user chooses (using Browse button)? I need to store 5 large numeric values in the file and save it (Type of the values: BigInteger).
thanks.
  • 0

#2 lespauled

lespauled

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1360 posts
  • Programming Language:C, C++, C#, JavaScript, PL/SQL, Delphi/Object Pascal, Visual Basic .NET, Pascal, Transact-SQL, Bash

Posted 13 October 2012 - 08:12 AM

What have you done so far?
  • 0
My Blog: http://forum.codecal...699-blog-77241/
"Women and Music: I'm always amazed by other people's choices." - David Lee Roth

#3 gibsray

gibsray

    CC Newcomer

  • Member
  • PipPip
  • 10 posts
  • Programming Language:C, C#, Assembly
  • Learning:C, C#, Assembly

Posted 13 October 2012 - 08:54 AM

What have you done so far?

well I can make a new XML file which contains the values that I want (using XMLDocument) but I don't know how to save it in the path that the user wants and how to let the user choose it's name (I want that there'll be a browse button and the user will chose the path and the file name)..
  • 0

#4 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts
  • Location:Argentina
  • Programming Language:C, C++, C#, PHP, JavaScript, Transact-SQL, Bash, Others
  • Learning:Java, Others

Posted 13 October 2012 - 09:23 AM

Your browse button should call a Dialog, a FolderBrowserDialog, which you create start by code ( few lines ), and when the dialog exists, if the result is OK, then you take the value you need from that dialog object, you will have the filename, fullpath, and everything the user choose in that object's properties.
  • 0





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download