TouchXML installation guide

TouchXML is a libxml API wrapper written in Objective-C and usually helps with all your project XML needs. While writing my post about parsing XML element attributes and putting up demo project I realized that I tend to forget how to add TouchXML to new project, so here goes step-by-step of that procedure:

1. Get TouchXML

You can find archives to download in touchcode project downloads . Go to TouchCode github page and download TouchXML archive and extract it anywhere you like. It’s common practice to keep such libraries and classes in Developer/ExtraLibs directory.

2. Enable libxml2 library

First things first, before we actually add TouchXML files, we need to do some project configuration changes, so our project could use libxml library.

1. Go to “Project -> Edit project settings”

2. Activate “Build” tab

3. Search for “Header search paths” setting and add /usr/include/libxml2 value to it

libxml header search paths

4. Search for “Other linker flags” setting and add -lxml2 value

touchxml other linker flags

P.s. notice that search function is really useful for finding settings you need faster.

3. Add TouchXML classes

1. Right click (option click) on your projects “Classes” folder and go to “Add -> Existing files…”

2. Navigate to the directory where extracted TouchXML is kept and browse  deeper to “Common -> Source”. Select everything! And click “Add” obviously.

touchxml classes

3. Confirm.

Now you should see a bunch of new files in your project. I usually group them by selecting files I wish to group and then selecting “Group” in context (right click/option click) menu.

4. Import TouchXML to your project

#import "TouchXML.h"

That is all the “magic” and you’re good to go. Since, I am not going to write about actually using TouchXML, you can see a nice working example in my previous post.

5. Common errors

Error: libxml/tree.h: No such file or directory

… and hundreds of something missing errors. It means that something went wrong with “Header search paths”. Maybe you didn’t added /usr/include/libxml2
or added incorrectly? Check it.

Error: “_xmlDocDumpFormatMemory”, referenced from:- [CXMLDocument description] in CXMLDocument.o

… and tens of errors like this. While errors by them selfs aren’t very expressive, they wish to inform you, that you did not added -lxml2 flag to “Other linker flags”

And that is all for now!

Tags: , ,

78 responses

  1. Posted August 21, 2014 at 20:23 | Permalink

    Wonderful, what a web site it is! This web site provides valuable
    facts to us, keep it up.

  2. Posted September 13, 2014 at 02:35 | Permalink

    To get relevant horsebox insurance equity release information, however, in not having to resort to
    crime? However, it is very important for everyone because if you wait for a benefit trigger to occur
    15 years from now and fully retired in six to seven.

  3. Posted September 16, 2014 at 03:21 | Permalink

    A motivating discussion is definitely worth comment. I do think that you should publish more about
    this topic, it may not be a taboo subject but typically folks
    don’t speak about thyese issues. To the next! All the best!!

  4. Posted September 21, 2014 at 14:48 | Permalink

    La base n’est pas seulement de nature défensive et servira de bouée de sauvetage pour les structures de l’armée et des soldats
    qui est nécessaire pour attaquer des clans ennemis et
    aussi pour les éliminer.

  5. Posted September 23, 2014 at 00:46 | Permalink

    I was recommended this web site by my cousin. I’m not sure whether
    this poswt is written by him as no one else know such detailed
    about my difficulty. You are incredible! Thanks!

  6. Posted September 25, 2014 at 12:48 | Permalink

    I am regular visitor, how are you everybody? This article posted
    at this web page is genuinely good.

  7. Posted October 2, 2014 at 08:47 | Permalink

    Hi there are using WordPress for your sitre platform? I’m new to
    the blog world but I’m trying to get started and set up my own. Do you need any html coding knowledge to make your oown blog?
    Any help would be greatly appreciated!

    my blog post renting [Gale]

Leave a Reply