Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 11-24-2004, 05:55 AM   #1
Registered: Nov 2004
Posts: 63

Rep: Reputation: 15
How can i read an write to a HTML or xml file using C

I have a data strcuture containing the follwoing elements

struct my_data
int no;
char *input ;
char *output;
char * descritpiton;
char *time;

now i want to write the structure elements to a HTML or xml file in a tabular form as an output of my program at the same time i want read some of the output as input to my program for example say i want pick up the value from the html file where time is just before the current time.


/*******html file starts here *************/

" This is MY Program Output genrated on "current date and time"

Number Input output Description time

/********** html file end here **********/

every time i run the code new values of the structure elemnts will be appneded to the exisitng html file or depening upon the some conditions a new html file is generated and values ar added to new file .

iam totaly new to html or xml but i know C
Old 11-24-2004, 06:07 AM   #2
Senior Member
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
HTML and XML are pure text formats so you'll read and write to them using the normal C file operations like fopen and so on.

If you are asking for an entire program to do this, I don't think many people here will take the effort to do it. You must work it out on your own.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Read Write for NTFS file system geeedeee Linux - Laptop and Netbook 8 06-05-2006 08:41 PM
read the input file and write in the given format suchi_s Programming 8 12-17-2004 02:12 AM
create, read and write a table in xml file using C alix123 Programming 1 12-02-2004 01:18 PM
Open office read only, K-write read/write mode lwtvh Linux - Newbie 1 07-19-2003 12:33 PM
Change from Read only to Read Write File System? justiceisblind Linux - Newbie 3 03-03-2002 08:23 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:25 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration