GIDForums  

Go Back   GIDForums > Computer Programming Forums > C Programming Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 16-Nov-2009, 04:38
psm psm is offline
New Member
 
Join Date: Nov 2009
Posts: 9
psm is on a distinguished road

Save to XML


Good afternoon,
please can you advice me, how to save some data to xml? I need it in language C. I will have some number (123341) from reader and I need to give it to xml with time, when it will be recieved. Thank you.
  #2  
Old 16-Nov-2009, 06:53
Howard_L Howard_L is offline
Regular Member
 
Join Date: Apr 2007
Location: Maryland/PA, USA
Posts: 846
Howard_L is a jewel in the roughHoward_L is a jewel in the roughHoward_L is a jewel in the rough

Re: Save to XML


Search the C forum for previous posts on "write data to file" or variations of that.
Put together an example of what you want to accomplish as best you can and post it here.
Read the Guidlines to find out how to enclose your code with code tags and other good stuff.
  #3  
Old 16-Nov-2009, 11:05
psm psm is offline
New Member
 
Join Date: Nov 2009
Posts: 9
psm is on a distinguished road

Re: Save to XML


Quote:
Originally Posted by Howard_L
Search the C forum for previous posts on "write data to file" or variations of that.
Put together an example of what you want to accomplish as best you can and post it here.
Read the Guidlines to find out how to enclose your code with code tags and other good stuff.
So I searched the C forum, but I didnt find nothing. And I think that it is the best explanation. It is very simple possibly, but I cant find anything about it. I want just to save received data to xml and I want to give the time there. And what Guidlines is???
  #4  
Old 16-Nov-2009, 12:41
fakepoo fakepoo is offline
Regular Member
 
Join Date: Oct 2007
Posts: 761
fakepoo is a jewel in the roughfakepoo is a jewel in the roughfakepoo is a jewel in the rough

Re: Save to XML


If you already know how to generate the XML as a string and just want to know how to write to a file:
CPP / C++ / C Code:
char XML[256] = "";
//...put your xml text into the XML string

FILE *fp = fopen("myfile.xml", "w");
fputs(XML, fp);
fclose(fp);

Otherwise, you should probably use a third-party XML library that does these things for you. From a simple web search of "XML library for C", I found a lot.
  #5  
Old 16-Nov-2009, 15:46
psm psm is offline
New Member
 
Join Date: Nov 2009
Posts: 9
psm is on a distinguished road

Re: Save to XML


Quote:
Originally Posted by fakepoo
If you already know how to generate the XML as a string and just want to know how to write to a file:
Thank you, I find some good things now, so I hope, that I do it. Then I give it here.
 
 

Recent GIDBlogNot selected for officer school by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MIME download of excel file will not always save to Desktop nawillis .NET Forum 1 21-Jul-2009 14:12
Sorting with Pointers kevin51292 C Programming Language 1 20-Feb-2007 13:11
How to save an existing file into a new file using "save as" method? asenthil MS Visual C++ / MFC Forum 3 26-Jan-2007 10:13
how to save output kumaran MS Visual C++ / MFC Forum 1 02-May-2005 06:32

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 06:33.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.