This is a discussion on C and XML within the Linux General forums, part of the Linux Forums category; Hi, I understand that XML documents are usually parsed by applications at run-time, and I wonder if it is ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I understand that XML documents are usually parsed by applications at run-time, and I wonder if it is possible to have the program change its behavior based on updates to the XML document? I was told that the C standard library doesn't provide the tools to do that. However, a C program can use OS-specific functions which would allow it, and many OSs have that capability. I'm using RedHat Enterprise Linux 5. Are such functions available on my OS, and if so, what are those? Thank you. Regards, Rayne |
|
|||
|
lancer6238@gmail.com writes:
> Hi, > > I understand that XML documents are usually parsed by applications at > run-time, and I wonder if it is possible to have the program change > its behavior based on updates to the XML document? I was told that the > C standard library doesn't provide the tools to do that. However, a C > program can use OS-specific functions which would allow it, and many > OSs have that capability. I'm using RedHat Enterprise Linux 5. Are > such functions available on my OS, and if so, what are those? The functions that are available to you are the same function that are available everywhere else. There are functions that let you open and read files, or check the file's last modification timestamp. It's all a matter of implementing a framework that checks if its XML configuration file has changed, and if so reloads its contents. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkn2XgsACgkQx9p3GYHlUOLhiACcDQEgF1QGew mqnFLhNh6ip74I 18EAnjhrRny4Z5dORxoQVjEEkE6AEkD5 =EqHp -----END PGP SIGNATURE----- |
|
|||
|
lancer6238@gmail.com writes:
> Hi, > > I understand that XML documents are usually parsed by applications at > run-time, and I wonder if it is possible to have the program change > its behavior based on updates to the XML document? I was told that the > C standard library doesn't provide the tools to do that. However, a C > program can use OS-specific functions which would allow it, and many > OSs have that capability. I'm using RedHat Enterprise Linux 5. Are > such functions available on my OS, and if so, what are those? It's not native to the OS. You have to add it. Pick a language, then search for XML support in that language. Java, perl, etc. |
|
|||
|
On 04/28/2009 04:28 PM, Maxwell Lol wrote:
> lancer6238@gmail.com writes: > >> Hi, >> >> I understand that XML documents are usually parsed by applications at >> run-time, and I wonder if it is possible to have the program change >> its behavior based on updates to the XML document? I was told that the >> C standard library doesn't provide the tools to do that. However, a C >> program can use OS-specific functions which would allow it, and many >> OSs have that capability. I'm using RedHat Enterprise Linux 5. Are >> such functions available on my OS, and if so, what are those? > > It's not native to the OS. You have to add it. What do you mean add it, to the OS or what? > Pick a language, then search for XML support in that language. > Java, perl, etc. Why pick a language? The OP is already asking/trying to accomplish XML parsing in *C* language, What Java, Perl, etc has to do with the original question? Why not C? See http://expat.sourceforge.net/ and also C++ http://xerces.apache.org/xerces-c/ -- Balwinder S "bdheeman" Dheeman Registered Linux User: #229709 Anu'z Linux@HOME (Unix Shoppe) Machines: #168573, 170593, 259192 Chandigarh, UT, 160062, India Plan9, T2, Arch/Debian/FreeBSD/XP Home: http://cto.homelinux.net/~bsd/ Visit: http://counter.li.org/ |