First, make sure you installed libxml2.
Get it from here: LibXml2
Open Eclipse, New Project -> C Project.
On the menu Project, choose Properties, left pane: C/C++ Build - right pane: tab Tool Settings, choose GCC C Linker -> Libraries. On Libraries box, add "xml2". Then Apply -> OK
Left pane: C/C++ General -> Paths & Symbols, under tab Includes, under Languages list choose GNU C, click Add, type "/usr/include/libxml2". Then Apply -> OK.
Have fun!@