0

I am trying to parse HTML URL content using hpple for iPhone app. I want to parse and get data from like this URL http://www.example.com/mobile/403.html. I have used Google and found hpple for HTML parsing. I got the sample HTML parsing hpple code from github. When i start to run the project the below error is occurring

'libxml/tree.h' file not found

I have added this line ${SDKROOT}/usr/include/libxml2 in project->build->header search paths but not it is looking like this iPhoneos3.1.2/usr/include/libxml2/** and also i have included libxml2.dylib and libxml2.2.dylib in my project. Am working in XCode 4.2. Could you please help to solve this error? Thanks in advance.

Gopinath
  • 5,392
  • 21
  • 64
  • 97
  • See my answer http://stackoverflow.com/questions/10577912/libxml2-tree-h-not-found-in-my-xcode-project/10577987#10577987 – Deepesh Jun 02 '12 at 11:50
  • @elppa Thank you. I have added libxml2 framework already. And added ${SDKROOT}/usr/include/libxml2 in Project->Build->Header Search Path. Still am getting the same error. Can you please help me. Thanks in advance. – Gopinath Jun 02 '12 at 12:01
  • r u use beta xcode version ya xcode – Deepesh Jun 02 '12 at 12:10
  • Thank you. No am not using beta version of Xcode. Currently am using XCode 4.2 version for development. I need your help Mr.Elppa. Thanks. – Gopinath Jun 02 '12 at 12:13
  • follow this http://stackoverflow.com/questions/1428847/libxml-tree-h-no-such-file-or-directory – Deepesh Jun 02 '12 at 12:22
  • @elppa Thank you. just i have tried the steps in your provided link but still am getting the same error. Any idea. Thanks. – Gopinath Jun 02 '12 at 12:48
  • can you check, libxml2.dylib has checked marked in target membership. If not then checked it and compile. – Atif Jun 02 '12 at 14:05
  • @Atif Thanks for your comment. Could you please tell me clearly? I can't understand? Thanks in advance. – Gopinath Jun 02 '12 at 14:22
  • First select dylib file in project navigator (left side) then show utilities (right side) select file inspector. There is the tab name Target Membership. Make sure the dylib file must be selected. Because I have face this problem one time and don't know how it will unselected. – Atif Jun 02 '12 at 14:57
  • @Atif Yes it is selected (Checked). But still the error is occurring. What to do? Can you please help me. Thanks in advance. – Gopinath Jun 02 '12 at 15:16
  • I am not sure, but check your Base SDK in Project > Build Setting it will be 3.1.2 thats the reason it show > iPhoneos3.1.2/usr/include/libxml2/** Change to latest iOS then it will update your iPhoneosX.X/usr/include/libxml2/** then compile it. – Atif Jun 02 '12 at 16:23

1 Answers1

0

Make sure you add this line:

${SDKROOT}/usr/include/libxml2 

in TARGETS->build->header search paths...

and make sure that you copied your hpple files into your project like this...

enter image description here

enter image description here

Good luck and hope this helps!

iDevMartin
  • 193
  • 3
  • 15