XML programming in Linux
For a detailed tutorial on XML programming, check the libxml tutorial.
To start XML programming in Ubuntu, you must have the following packages in your system
- libxml2
- libxml2-dev
- libxml2-doc
- libxml2-utils
To install these packages,
$ sudo apt-get install libxml2 libxml2-dev libxml2-doc libxml2-utils
Once you install these packages, you must check the path where the libxml2 header files are present
$ xml2-config --cflags -I/usr/include/libxml2
You must make use of the above path while writing your codes. Also to compile your code, you must know the library corresponding to libxml.
$ xml2-config --libs -lxml2
Now you know both these values, you can compile your program containing libXML headers and functions in the following manner
$ gcc file.c `xml2-config --cflags --libs`
Comments:
i troubled in running xml file using c in linux. i dont know how to compile. none helped.
the above coding helped. very very thanks
Thanks Karthik. Hope you find many other useful articles
I dint know to compile xml..this post helped me..Thank you
Thanks KVB, You can also follow us on our Facebook Fan Page
Short but helpful article. Very thanks!