C and XML

L

lancer6238

Hi,

I'm curious to know if it is possible to write C programs that could
read from a XML document. And since I understand that XML documents
are usually parsed by applications at run-time, perhaps it is even
possible to have the program change its behavior based on updates to
the XML document?

Or maybe there already are tools available for this purpose?

Thank you.

Regards,
Rayne
 
J

James Kuyper

Hi,

I'm curious to know if it is possible to write C programs that could
read from a XML document. ...

Sure. XML is stored in text files, and C has no trouble reading text
files. I suspect that you would also like to use C to parse the file,
and not merely read it :). That is a significantly more complicated
task, though well within the capabilities of C. However, C is not, in my
experience, the best language for text parsing. perl is much better at
it than C, and I've heard claims that some other languages are even
better for such purposes than perl. I wouldn't be at all surprised if
there was an existing perl module for parsing XML.
... And since I understand that XML documents
are usually parsed by applications at run-time, perhaps it is even
possible to have the program change its behavior based on updates to
the XML document?

The C standard library doesn't provide the tools you'd need to do that.
However, a C program can use OS-specific functions which would allow it,
and many OSs have that capability. You should ask on a newsgroup
specific to your target OS to find out how.
Or maybe there already are tools available for this purpose?

There certainly are. Unfortunately, I have no idea what they are. but I
can avoid feeling guilty about answering you that way, because you only
asked us to confirm their existence, not to identify them :).
 
I

Ian Collins

Hi,

I'm curious to know if it is possible to write C programs that could
read from a XML document. And since I understand that XML documents
are usually parsed by applications at run-time, perhaps it is even
possible to have the program change its behavior based on updates to
the XML document?

Or maybe there already are tools available for this purpose?

Search for libxml.
 
E

eps

Hi,

I'm curious to know if it is possible to write C programs that could
read from a XML document. And since I understand that XML documents
are usually parsed by applications at run-time, perhaps it is even
possible to have the program change its behavior based on updates to
the XML document?

Or maybe there already are tools available for this purpose?

Thank you.

Regards,
Rayne

great idea, we could call it a "configuration file"

just popping down to the patent office, this is one hell of an idea...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,001
Messages
2,570,254
Members
46,849
Latest member
Fira

Latest Threads

Top