views:

21

answers:

1

It it possible for objective c to compile xml data (aiml files for example)??

I'm looking for it to compile AIML files then be able to "chat" with the files using objective c. Is there a XMLView or something??? Any ideas??

Elijah

+1  A: 

What do you mean by "compiling"? There's no such concept as compiling a generic XML file. I don't have a detailed understanding of aiml files, but it's not that you want to view the XML data itself in it, right? Or is that what you want?

I suppose you want to make an aiml-based bot which operates based on data given in the aiml file. Then what you need is not an XML viewer; rather, you need an implementation of aiml bot. This is not about XML per se.

You might have misunderstood, but XML is not a programming language in itself; it's just a nice way to organize data in a plain text. It's not that you can take an XML file, compile and run it just as you would do with a C/C++/Objective-C source code.

You should have a look at the list of the implementations there: http://www.alicebot.org/downloads/programs.html

Objective-C is a superset of C, and you can also use C++ together using Objective-C++. So you should be able to use the C++ implementations listed there.

Yuji
Thanks! Yes that is correct. would this be possible only with objective-c??? I don't want to use C++ because I'm not familiar with it.
Elijah W.
Also, all of the C and C++ aiml interpreters on that list are for windows...so I need to make this from scratch almost...any ideas?
Elijah W.
Aiml interpreters should be quite independent of the platform. It reads a string and returns a string, right? `libaiml` looks like it's a UNIX implementation. It should be relatively easy to use that on OS X.
Yuji
Also, I guess writing one from scratch would be harder than learning C++. In particular, just using a C++ library is not that hard. You should think of it as a good chance for you to learn C++. Have fun!
Yuji
That might work...now, should I just copy all the .c .cpp and .h files into my app?? I then make the GUI for it?? How would I connect these files with my apps .h and .m files?
Elijah W.
Download it and use it. There should be a documentation inside how to call that library from another C++ program. It'll take some time for you to get how to do that, but be willing to learn and be patient, and ask at SO if you have a specific question!
Yuji
haha! :D Ok, thanks for your help! :D
Elijah W.