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----- |
|
|||
|
On 04/27/2009 08:14 PM, lancer6238@gmail.com wrote:
> 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 Install the Redhat equivalent of Debian's libexpat1-dev. It's a library that lets you read XML files from the C language. |
|
|||
|
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/ |
|
|||
|
Balwinder S Dheeman <bsd.SANSPAM@cto.homelinux.net> writes:
> 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? To your application. > >> 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? He was saying that XML parsers exist for pretty much all languages. > > Why not C? See http://expat.sourceforge.net/ > and also C++ http://xerces.apache.org/xerces-c/ Using gnome? No problem. http://www.xmlsoft.org/ -- In view of all the deadly computer viruses that have been spreading lately, Weekend Update would like to remind you: when you link up to another computer, you’re linking up to every computer that that computer has ever linked up to. — Dennis Miller |
|
|||
|
Balwinder S Dheeman <bsd.SANSPAM@cto.homelinux.net> writes:
> 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? The OS is everything: kernel, libraries, utilities, header files, etc. I don;t thnk you need to modify the kernel. > >> 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? I'm not sure he requires a C solution. I read it as an example language. > > Why not C? See http://expat.sourceforge.net/ > and also C++ http://xerces.apache.org/xerces-c/ C is fine as well. As I said, first pick a language.. |